Class: Fastlane::Helper::AppliveryHelper
- Inherits:
-
Object
- Object
- Fastlane::Helper::AppliveryHelper
- Defined in:
- lib/fastlane/plugin/applivery/helper/applivery_helper.rb
Class Method Summary collapse
- .add_git_params ⇒ Object
- .add_git_remote ⇒ Object
- .add_git_tag ⇒ Object
- .add_integration_number ⇒ Object
-
.is_git? ⇒ Boolean
GIT Methods ###.
- .platform ⇒ Object
-
.show_message ⇒ Object
class methods that you define here become available in your action as ‘Helper::AppliveryHelper.your_method`.
Class Method Details
.add_git_params ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 39 def self.add_git_params command = "" if self.is_git? UI. "Detected repo: git" gitBranch = Actions.git_branch gitCommit = Actions.sh('git rev-parse --short HEAD') gitMessage = Actions. command += " -F gitBranch=\"#{gitBranch}\"" command += " -F gitCommit=\"#{gitCommit}\"" command += " -F gitMessage=\"#{gitMessage}\"" command += self.add_git_remote command += self.add_git_tag end return command end |
.add_git_remote ⇒ Object
68 69 70 71 72 73 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 68 def self.add_git_remote gitRepositoryURL = Actions.sh('git config --get remote.origin.url') return " -F gitRepositoryURL=\"#{gitRepositoryURL}\"" rescue return "" end |
.add_git_tag ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 56 def self.add_git_tag gitTag = Actions.sh('git describe --abbrev=0 --tags') gitTagCommit = Actions.sh("git rev-list -n 1 --abbrev-commit #{gitTag}") gitCommit = Actions.sh('git rev-parse --short HEAD') if gitTagCommit == gitCommit return " -F gitTag=\"#{gitTag}\"" end return "" rescue return "" end |
.add_integration_number ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 20 def self.add_integration_number integrationNumber = ENV["XCS_INTEGRATION_NUMBER"] # XCode Server command = "" if !integrationNumber.nil? command += " -F buildNumber=\"#{integrationNumber}\"" end return command end |
.is_git? ⇒ Boolean
GIT Methods ###
32 33 34 35 36 37 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 32 def self.is_git? Actions.sh('git rev-parse HEAD') return true rescue return false end |
.platform ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 11 def self.platform platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME] if platform == :ios or platform.nil? return "ios" elsif platform == :android return "android" end end |
.show_message ⇒ Object
class methods that you define here become available in your action as ‘Helper::AppliveryHelper.your_method`
7 8 9 |
# File 'lib/fastlane/plugin/applivery/helper/applivery_helper.rb', line 7 def self. UI.("Hello from the applivery plugin helper!") end |