Sha256: e7ee6d5ed64eefcbfa9771f9cf37cf61a5f98c53513e7c8ea19c79c9c881ba5b
Contents?: true
Size: 1.59 KB
Versions: 21
Compression:
Stored size: 1.59 KB
Contents
module Fastlane module Actions module SharedValues end class SetBuildNumberRepositoryAction < Action def self.is_supported?(platform) platform == :ios end def self.is_svn? Actions.sh 'svn info' return true rescue return false end def self.is_git? Actions.sh 'git rev-parse HEAD' return true rescue return false end def self.is_git_svn? Actions.sh 'git svn info' return true rescue return false end def self.run(params) if is_svn? Helper.log.info "Detected repo: svn" command = 'svn info | grep Revision | egrep -o "[0-9]+"' elsif is_git_svn? Helper.log.info "Detected repo: git-svn" command = 'git svn info | grep Revision | egrep -o "[0-9]+"' elsif is_git? Helper.log.info "Detected repo: git" command = 'git rev-parse --short HEAD' else raise "No repository detected" end build_number = Actions.sh command Fastlane::Actions::IncrementBuildNumberAction.run(build_number: build_number) end ##################################################### # @!group Documentation ##################################################### def self.description "Set the build number from the current repository" end def self.available_options [ ] end def self.output [ ] end def self.author 'pbrooks' end end end end
Version data entries
21 entries across 21 versions & 1 rubygems