Skip to content

Commit

Permalink
Update Fastfile: add release lane
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira committed Dec 20, 2019
1 parent 894abaa commit f1d3f8d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
25 changes: 23 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
default_platform(:ios)

platform :ios do
desc "Bump Version"
lane :bump_version do |options|
desc "Bump the projecy version"
lane :version_bump_project do |options|
next_version = "undefined"

project = Xcodeproj::Project.open('../msgpack.xcodeproj')
project.build_configurations.each do |build|
current_version = build.build_settings['SHARED_VERSION_NUMBER']
Expand Down Expand Up @@ -34,5 +36,24 @@ platform :ios do
puts " - #{target.name}"
end
project.save()

next_version
end

desc "Prepare a new Release version"
lane :release do |options|
ensure_git_status_clean(show_uncommitted_changes: true)
version_number = version_bump_project(bump_type: options[:bump])
version_bump_podspec(bump_type: options[:bump])
git_commit(path: [
"./msgpack.podspec",
"./msgpack.xcodeproj/project.pbxproj",
], message: "Bump to v" + version_number)
if !git_tag_exists(tag: version_number)
add_git_tag(
tag: version_number,
sign: true
)
end
end
end
11 changes: 8 additions & 3 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ or alternatively using `brew cask install fastlane`

# Available Actions
## iOS
### ios bump_version
### ios version_bump_project
```
fastlane ios bump_version
fastlane ios version_bump_project
```
Bump Version
Bump the projecy version
### ios release
```
fastlane ios release
```
Prepare a new Release version

----

Expand Down

0 comments on commit f1d3f8d

Please sign in to comment.