Skip to content

Commit

Permalink
Fix workflow to handle already update constant. [release-5.2.0]
Browse files Browse the repository at this point in the history
  • Loading branch information
navjottomer committed Apr 23, 2024
1 parent acd1727 commit 92badd2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ jobs:
git merge develop
else
git checkout -b release/$BASE_VERSION
git pull origin develop
fi
fi
# Update version in codebase
sed -i -E "s/define\('OSCLASS_VERSION.+\);/define('OSCLASS_VERSION', '$VERSION');/" oc-includes/osclass/default-constants.php
# Commit changes
git add oc-includes/osclass/default-constants.php
git commit -m "Update version to $VERSION"
# Commit changes if changes were made
if [[ $(git status --porcelain) ]]; then
git add oc-includes/osclass/default-constants.php
git commit -m "Update version to $VERSION"
fi
# Push changes and create tag
git push origin HEAD
Expand Down

0 comments on commit 92badd2

Please sign in to comment.