class Fastlane::Helper::GitBuildTag
Public Class Methods
new(str, tag_prefix)
click to toggle source
# File lib/fastlane/plugin/git_build_versioning/helper/git_build_versioning_helper.rb, line 13 def initialize(str, tag_prefix) # Instance variables @tag_prefix = tag_prefix @str = str end
Public Instance Methods
build_number()
click to toggle source
# File lib/fastlane/plugin/git_build_versioning/helper/git_build_versioning_helper.rb, line 23 def build_number full_name = @str.split('refs/tags/').last m = full_name.match(/^#{@tag_prefix}(\d+)$/) if m && m[1] number_or_nil(m[1]) end end
hash()
click to toggle source
# File lib/fastlane/plugin/git_build_versioning/helper/git_build_versioning_helper.rb, line 19 def hash (@str.split('refs/tags/').first || '').strip end
is_build_number?()
click to toggle source
# File lib/fastlane/plugin/git_build_versioning/helper/git_build_versioning_helper.rb, line 31 def is_build_number? build_number != nil end
to_s()
click to toggle source
# File lib/fastlane/plugin/git_build_versioning/helper/git_build_versioning_helper.rb, line 35 def to_s "GitBuildTag<#{self.hash}, #{self.build_number}>" end