Skip to content

Commit

Permalink
do the same for pod and spm
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Mar 1, 2017
1 parent 5b9abd1 commit b113453
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
12 changes: 7 additions & 5 deletions rakelib/pod.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace :pod do
desc 'Lint the Pod'
task :lint do |task|
Utils.print_info 'Linting the pod spec'
Utils.run(%Q(bundle exec pod lib lint "#{POD_NAME}.podspec" --quick), task)
if File.file?('Podfile')
namespace :pod do
desc 'Lint the Pod'
task :lint do |task|
Utils.print_info 'Linting the pod spec'
Utils.run(%Q(bundle exec pod lib lint "#{POD_NAME}.podspec" --quick), task)
end
end
end
22 changes: 12 additions & 10 deletions rakelib/spm.rake
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
namespace :spm do
desc 'Build using SPM'
task :build do |task|
Utils.print_info 'Compile using SPM'
Utils.run("swift build", task, xcrun: true)
end
if File.file?('Package.swift')
namespace :spm do
desc 'Build using SPM'
task :build do |task|
Utils.print_info 'Compile using SPM'
Utils.run("swift build", task, xcrun: true)
end

desc 'Run SPM Unit Tests'
task :test => :build do |task|
Utils.print_info 'Run the unit tests using SPM'
Utils.run("swift test", task, xcrun: true)
desc 'Run SPM Unit Tests'
task :test => :build do |task|
Utils.print_info 'Run the unit tests using SPM'
Utils.run("swift test", task, xcrun: true)
end
end
end

0 comments on commit b113453

Please sign in to comment.