We have developers here that when they commit to git the trigger will run Bitrise. Bitrise will build it and push it to the app connect store for Testflight internal testing.
I was using Set Xcode Project Build Number which works create to offset the build number and keep increasing.
The problem i am having is the testers are not sure what commit they are testing. What i was trying to do was add the git hash number somewhere. I was thinking to put it in the build code number but the hash is to long. Is there a way to shorten this when sending it.
Does anyone else have any other ideas how distinguish different builds? I know i can add it in the test notes in testflight but it would have to be added manually as far as i know.
Right I understand how to get the short hash, but how can I automatically put it as the build number.
I was using Set Xcode Project Build Number to offset the build number by 1. Is there a specific way to add the short hash command in the Set Xcode Project Build Number?
So I am able to get the script to work properly. I tried using the variable but it does not seem to work. Please see biterise.yml below.
++ git log --pretty=format:%h -n 1
newHashNumber=773d5792
envman add newHashNumber
This is my yml file.
script:
title: Do anything with Script step
inputs:
- content: |+
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
echo "Hello World!"
newHashNumber=$(git log --pretty=format:'%h' -n 1)
envman add --key newHashNumber
# or run a script from your repository, like:
# bash ./path/to/script.sh
# not just bash, e.g.:
# ruby ./path/to/script.rb
Unfortunately what I was trying did not work, but it did what it was suppose to do in bitrise.
The app connect store requires you to have an incremental build number to upload. So witht he string from the hash it does not work.
I created another thread to see if there is a way to add anything from bitrise to the test flight release notes/test notes