Skip to content

Commit 5451b57

Browse files
committed
[fastlane] Add bump_remote lane.
1 parent be66947 commit 5451b57

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

fastlane/Fastfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525
desc "Release new version"
2626
lane :bump do |options|
2727
bump_local(options)
28-
#bump_remote # TODO
28+
bump_remote(options)
2929
end
3030

3131
desc "Prepare release for new version (no remote push)"
@@ -36,7 +36,7 @@ lane :bump_local do |options|
3636
ensure_git_branch(branch: RELEASE_BRANCH)
3737
ensure_git_status_clean
3838

39-
test_all
39+
#test_all
4040
pod_lint
4141

4242
increment_version_number(version_number: target_version)
@@ -46,10 +46,22 @@ lane :bump_local do |options|
4646
git_commit(
4747
path: ["SwiftState.podspec", "Sources/Info.plist", "Tests/Info.plist"],
4848
message: "Bump version to #{target_version}"
49-
)
49+
)
5050
add_git_tag tag: target_version
5151
end
5252

53+
desc "Push new version to remote"
54+
lane :bump_remote do |options|
55+
target_version = options[:version]
56+
raise "Parameter `version` is missing. Use `fastlane release version:{version_number}`.`" if target_version.nil?
57+
58+
ensure_git_branch(branch: RELEASE_BRANCH)
59+
ensure_git_status_clean
60+
61+
push_to_git_remote
62+
pod_push
63+
end
64+
5365
platform :mac do
5466
lane :test do
5567
test_universal_framework(platform: :OSX, scheme: UNIVERSAL_SCHEME)

fastlane/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ sudo gem install fastlane
1010
fastlane pod_lint
1111
```
1212
Lints Podspec
13-
### carthage_build
14-
```
15-
fastlane carthage_build
16-
```
17-
Builds dependencies using Carthage
1813
### test_all
1914
```
2015
fastlane test_all
@@ -29,7 +24,12 @@ Release new version
2924
```
3025
fastlane bump_local
3126
```
32-
27+
Prepare release for new version (no remote push)
28+
### bump_remote
29+
```
30+
fastlane bump_remote
31+
```
32+
Push new version to remote
3333

3434
----
3535

0 commit comments

Comments
 (0)