Skip to content

Commit

Permalink
handle minor release
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 committed Jul 12, 2024
1 parent 1f08938 commit 7785701
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
run: |
echo "VERSION=$(echo $VERSION | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo "\1.$((\2-1)).\3"/e')"
echo "VERSION=$(npx semver -i patch $VERSION)" >> $GITHUB_ENV
- if: ${{ github.event.inputs.isLastMinorRelease == 'true' && github.event.inputs.isMinorRelease == 'false'}}
run: echo "VERSION=$(npx semver -i minor $VERSION)" >> $GITHUB_ENV

- name: Update Nuxeo Admin Console UI version to ${{ env.VERSION }}
env:
Expand Down Expand Up @@ -102,14 +105,14 @@ jobs:
curl -o $PACKAGE.zip -L -u "${{ secrets.CONNECT_PREPROD_AUTH }}" "$CONNECT_PREPROD_URL/site/marketplace/package/nuxeo-admin-console-ui-package/download?version=$PADDED_VERSION"
unzip -d $PACKAGE $PACKAGE.zip && rm $PACKAGE.zip
pushd $PACKAGE
if [ "${{ github.event.inputs.isMinorRelease }}" == "true" ]; then
sed -i "s/${{ github.event.inputs.version }}/${{ env.VERSION }}/g" package.xml
if [ "${{ github.event.inputs.isMinorRelease }}" == "true" ] || [ "${{ github.event.inputs.isLastMinorRelease }}" == "true" ]; then
sed -i "s/$PADDED_VERSION/${{ env.VERSION }}/g" package.xml
else
sed -i 's/-rc.[0-9]*//' package.xml
fi
for f in install/bundles/*.jar; do
if [ "${{ github.event.inputs.isMinorRelease }}" == "true" ]; then
mv $f $(echo $f | sed -e "s/${{ github.event.inputs.version }}/${{ env.VERSION }}/")
if [ "${{ github.event.inputs.isMinorRelease }}" == "true" ] || [ "${{ github.event.inputs.isLastMinorRelease }}" == "true" ]; then
mv $f $(echo $f | sed -e "s/$PADDED_VERSION/${{ env.VERSION }}/")
else
mv $f $(echo $f | sed -e 's/-rc.[0-9]*//')
fi
Expand Down

0 comments on commit 7785701

Please sign in to comment.