File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 173173
174174private_lane :ra_upload_to_testflight do |options |
175175 if options [ :upload ] . nil? or options [ :upload ]
176- info = last_git_commit
177- short_hash = info [ :abbreviated_commit_hash ]
176+ short_hash = nil
177+ version_file = File . expand_path ( "../../../.git_version.h" , Dir . pwd )
178+ if File . exist? ( version_file )
179+ content = File . read ( version_file )
180+ match = content . match ( /#define\s +GIT_VERSION\s +([0-9a-fA-F]+)/ )
181+ if match
182+ short_hash = match [ 1 ]
183+ UI . message "Using commit from .git_version.h: #{ short_hash } "
184+ else
185+ UI . message ".git_version.h found but no GIT_VERSION; falling back to git"
186+ end
187+ end
188+ if short_hash . nil?
189+ info = last_git_commit
190+ short_hash = info [ :abbreviated_commit_hash ]
191+ UI . message "Using git commit from repo: #{ short_hash } "
192+ end
193+
178194 upload_to_testflight (
179195 distribute_external : ( options [ :public ] . nil? || options [ :public ] ) ,
180196 groups : options [ :public ] . nil? || options [ :public ] ? [ 'Invaders' , 'Patreons' ] : [ ] ,
You can’t perform that action at this time.
0 commit comments