Copy & adapt rake infrastructure from swiftgen projects
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
require 'json'
|
||||
# frozen_string_literal: true
|
||||
|
||||
def current_pod_version
|
||||
JSON.parse(File.read(PODSPEC_FILE))['version']
|
||||
end
|
||||
# Used constants:
|
||||
# - POD_NAME
|
||||
|
||||
namespace :pod do
|
||||
# rake pod:lint
|
||||
desc "Lint the podspec"
|
||||
task :lint do
|
||||
header "Linting podspec"
|
||||
sh("pod", "lib", "lint", PODSPEC_FILE)
|
||||
end
|
||||
|
||||
# rake pod:push
|
||||
desc "Push the podspec to trunk"
|
||||
task :push do
|
||||
header "Pushing podspec to trunk"
|
||||
sh("pod", "trunk", "push", PODSPEC_FILE)
|
||||
desc 'Lint the Pod'
|
||||
task :lint do |task|
|
||||
Utils.print_header 'Linting the pod spec'
|
||||
Utils.run(%(bundle exec pod lib lint "#{POD_NAME}.podspec.json" --quick), task)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user