Skip to content

Commit

Permalink
namespace commands
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Feb 19, 2017
1 parent 4ee70bf commit 15c5f60
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
32 changes: 19 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@ def plain(cmd, name)
end
end

task :spm_build do
plain("swift build", "spm_build")
end
namespace :spm do
desc 'Build using SPM'
task :build do
plain("swift build", "spm_build")
end

task :xcode_build do
xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests build-for-testing", "xcode_build")
desc 'Run SPM Unit Tests'
task :test => :build do
plain("swift test", "spm_build")
end
end

desc 'Run Xcode Unit Tests'
task :xcode_test => :xcode_build do
xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests test-without-building", "xcode_test")
end
namespace :xcode do
desc 'Build using Xcode'
task :build do
xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests build-for-testing", "xcode_build")
end

desc 'Run SPM Unit Tests'
task :spm_test => :spm_build do
plain("swift test", "spm_build")
desc 'Run Xcode Unit Tests'
task :test => :build do
xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests test-without-building", "xcode_test")
end
end

desc 'Lint the Pod'
task :lint do
plain("pod lib lint StencilSwiftKit.podspec --quick", "lint")
end

task :default => :xcode_test
task :default => "xcode:test"
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:

test:
override:
- rake xcode_test
- rake spm_test
- rake xcode:test
- rake spm:test
post:
- if [[ $CIRCLE_BRANCH == master ]]; then rake lint; fi

0 comments on commit 15c5f60

Please sign in to comment.