-
Notifications
You must be signed in to change notification settings - Fork 9
Add ios_get_build_number action
#458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8646fad
Add `get_build_number`
spencertransier 52549cd
Add `ios_get_build_number` action
spencertransier a55fe1d
Update the class name
spencertransier c91822b
Use `read_build_number_from_config_file`
spencertransier 4ed75df
Merge branch 'trunk' into add/get-build-number-action
spencertransier 5791070
Update CHANGELOG.md
spencertransier 4a3c89d
Add config item for using a path instead of env variable
spencertransier 5bc84ed
Call correct VersionHelper method
spencertransier 6638650
Add argument
spencertransier 6980bd9
Don't need to specify that it's public
spencertransier b083991
Re-add comma
spencertransier d9d69c5
Use `type` instead of `is_string`
spencertransier 7a15bb3
Merge branch 'trunk' into add/get-build-number-action
spencertransier bd10f19
Added unit tests for `ios_get_build_number`
spencertransier 425ae82
Fix Rubocop violation
spencertransier 4c73bc8
Remove _none_ from changelog
spencertransier d514621
Pass 'file/not/found' directly
spencertransier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| module Fastlane | ||
| module Actions | ||
| class IosGetBuildNumberAction < Action | ||
| def self.run(params) | ||
| require_relative '../../helper/ios/ios_version_helper' | ||
|
|
||
| UI.user_error!('You need to set at least the PUBLIC_CONFIG_FILE env var to the path to the public xcconfig file') unless ENV['PUBLIC_CONFIG_FILE'] | ||
|
|
||
| Fastlane::Helper::Ios::VersionHelper.get_build_number | ||
| end | ||
|
|
||
| ##################################################### | ||
| # @!group Documentation | ||
| ##################################################### | ||
|
|
||
| def self.description | ||
| 'Gets the public build number of the app' | ||
| end | ||
|
|
||
| def self.details | ||
| 'Gets the public build number of the app' | ||
| end | ||
|
|
||
| def self.available_options | ||
| # Define all options your action supports. | ||
| end | ||
|
|
||
| def self.output | ||
| # Define the shared values you are going to provide | ||
| end | ||
|
|
||
| def self.return_value | ||
| # If you method provides a return value, you can describe here what it does | ||
| 'Return the public build number of the app' | ||
| end | ||
|
|
||
| def self.authors | ||
| # So no one will ever forget your contribution to fastlane :) You are awesome btw! | ||
| ['Automattic'] | ||
| end | ||
|
|
||
| def self.is_supported?(platform) | ||
| [:ios, :mac].include?(platform) | ||
| end | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,6 +180,14 @@ def self.get_internal_version | |
| get_version_strings()[1] | ||
| end | ||
|
|
||
| # Returns the current value of the `BUILD_NUMBER` key from the public xcconfig file | ||
| # | ||
| # @return [String] The current build number according to the public xcconfig file. | ||
| # | ||
| def self.get_build_number | ||
| read_build_number_from_config_file(ENV['PUBLIC_CONFIG_FILE']) | ||
|
||
| end | ||
|
|
||
| # Prints the current and next release version numbers to stdout, then return the next release version | ||
| # | ||
| # @return [String] The next release version to use after bumping the currently used public version. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.