|
16 | 16 |
|
17 | 17 | # This is the minimum version number required.
|
18 | 18 | # Update this, if you use features of a newer version
|
19 |
| -fastlane_version "1.63.0" |
| 19 | +fastlane_version "1.66.0" |
20 | 20 |
|
21 | 21 | desc "Run all tests"
|
22 |
| - lane :test do |
23 |
| - scan(scheme: "RouterX iOS", clean: true, code_coverage: true) |
24 |
| - scan(scheme: "RouterX OSX", clean: true, code_coverage: true) |
25 |
| - scan(scheme: "RouterX tvOS", clean: true, code_coverage: true) |
26 |
| - |
27 |
| - Actions.sh("killall Simulator") |
28 |
| - end |
29 |
| - |
30 |
| - desc "Build for Carthage" |
31 |
| - lane :carthage_lint do |
32 |
| - Actions.sh("cd .. && carthage build --no-skip-current && cd fastlane") |
33 |
| - end |
34 |
| - |
35 |
| - desc "Lint for Cocoapods" |
36 |
| - lane :pod_lint do |
37 |
| - Actions.sh("cd .. && pod lib lint && cd fastlane") |
38 |
| - end |
39 |
| - |
40 |
| - desc "Lint" |
41 |
| - lane :lint do |
42 |
| - carthage_lint |
43 |
| - pod_lint |
44 |
| - end |
45 |
| - |
46 |
| - desc "Release new version" |
47 |
| - lane :release do |options| |
48 |
| - target_version = options[:version] |
49 |
| - raise "The version is missed. Use `fastlane release version:{version_number}`.`" if target_version.nil? |
50 |
| - |
51 |
| - ensure_git_branch |
52 |
| - ensure_git_status_clean |
53 |
| - |
54 |
| - test |
55 |
| - carthage_lint |
56 |
| - |
57 |
| - sync_build_number_to_git |
58 |
| - increment_version_number(version_number: target_version) |
59 |
| - version_bump_podspec(path: "RouterX.podspec", version_number: target_version) |
60 |
| - |
61 |
| - log = extract_current_change_log(version: target_version) |
62 |
| - release_log = update_change_log(log: log) |
63 |
| - |
64 |
| - git_commit_all(message: "Bump version to #{target_version}") |
65 |
| - add_git_tag tag: target_version |
66 |
| - |
67 |
| - push_to_git_remote |
68 |
| - |
69 |
| - set_github_release( |
70 |
| - repository_name: "jasl/RouterX", |
71 |
| - api_token: ENV['GITHUB_TOKEN'], |
72 |
| - name: release_log[:title], |
73 |
| - tag_name: target_version, |
74 |
| - description: release_log[:text] |
75 |
| - ) |
76 |
| - |
77 |
| - pod_push |
78 |
| - end |
| 22 | +lane :test do |
| 23 | + scan(scheme: "RouterX iOS", clean: true, code_coverage: true) |
| 24 | + scan(scheme: "RouterX OSX", clean: true, code_coverage: true) |
| 25 | + scan(scheme: "RouterX tvOS", clean: true, code_coverage: true) |
| 26 | + |
| 27 | + Actions.sh("killall Simulator") |
| 28 | +end |
| 29 | + |
| 30 | +desc "Build for Carthage" |
| 31 | +lane :carthage_lint do |
| 32 | + Actions.sh("cd .. && carthage build --no-skip-current && cd fastlane") |
| 33 | +end |
| 34 | + |
| 35 | +desc "Lint for Cocoapods" |
| 36 | +lane :pod_lint do |
| 37 | + Actions.sh("cd .. && pod lib lint && cd fastlane") |
| 38 | +end |
| 39 | + |
| 40 | +desc "Lint" |
| 41 | +lane :lint do |
| 42 | + carthage_lint |
| 43 | + pod_lint |
| 44 | +end |
| 45 | + |
| 46 | +desc "Release new version" |
| 47 | +lane :release do |options| |
| 48 | + target_version = options[:version] |
| 49 | + abort "The version is missed. Use `fastlane release version:{version_number}." if target_version.nil? |
| 50 | + |
| 51 | + ensure_git_branch |
| 52 | + ensure_git_status_clean |
| 53 | + |
| 54 | + sync_build_number_to_git |
| 55 | + increment_version_number(version_number: target_version) |
| 56 | + version_bump_podspec(path: "RouterX.podspec", version_number: target_version) |
| 57 | + |
| 58 | + git_commit_all(message: "Bump version to #{target_version}") |
| 59 | + add_git_tag tag: target_version |
| 60 | + push_to_git_remote |
| 61 | + |
| 62 | + set_github_release( |
| 63 | + repository_name: "jasl/RouterX", |
| 64 | + api_token: ENV['GITHUB_TOKEN'], |
| 65 | + name: target_version, |
| 66 | + tag_name: target_version, |
| 67 | + description: "RouterX #{target_version}" |
| 68 | + ) |
| 69 | + |
| 70 | + pod_push |
| 71 | +end |
79 | 72 |
|
80 | 73 | # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md
|
81 | 74 | # All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md
|
0 commit comments