Copy & adapt rake infrastructure from swiftgen projects

This commit is contained in:
David Jennes
2022-07-27 02:10:45 +02:00
parent d18e27d6e4
commit d9a48fbda6
15 changed files with 821 additions and 163 deletions

View File

@@ -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