File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,9 @@ jobs:
167167 sd "workspaceName: '.*'" "workspaceName: '${{ matrix.sample-app.cio-workspace-name }}'" "$ENV_FILE"
168168 sd "branchName: '.*'" "branchName: '$BRANCH_NAME'" "$ENV_FILE"
169169 sd "commitHash: '.*'" "commitHash: '${COMMIT_HASH:0:7}'" "$ENV_FILE"
170- sd "commitsAheadCount: '.*'" "commitsAheadCount: '$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)'" "$ENV_FILE"
170+ LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "untagged")
171+ COMMITS_AHEAD=$(git rev-list $LAST_TAG..HEAD --count 2>/dev/null || echo "untracked")
172+ sd "commitsAheadCount: '.*'" "commitsAheadCount: '$COMMITS_AHEAD'" "$ENV_FILE"
171173
172174 - name : Setup workspace credentials in iOS environment files
173175 working-directory : Apps/${{ matrix.sample-app.name }}/ios
You can’t perform that action at this time.
0 commit comments