Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Commit only relevant files in version increment workflow #2402

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/checkVersions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check for version increments and apply them if necessary
name: Check for and apply version increments

on:
workflow_call:
Expand Down Expand Up @@ -49,15 +49,15 @@ jobs:
- name: Commit version increments, if any
run: |
set -x
if [[ $(git status --ignore-submodules --porcelain) != '' ]]; then
# Workspace is not clean, i.e. some version were changed
git add '*/META-INF/MANIFEST.MF' '*/feature.xml' '*/pom.xml'
if [[ $(git diff --name-only --cached) != '' ]]; then
# Relevant files were staged, i.e. some version were changed

# Read 'releaseNumberSDK' property as stream version
streamVersion=$(mvn help:evaluate -Dexpression=releaseNumberSDK --quiet -DforceStdout)

git config --global user.email '${{ inputs.botMail }}'
git config --global user.name '${{ inputs.botName }}'
git add --all
git status
git commit -m "Version bump(s) for ${streamVersion} stream"

Expand Down