Skip to content

Commit

Permalink
GitHub action fix re version2 (#4980)
Browse files Browse the repository at this point in the history
* fix(re-version.sh): update jar names to include '-SNAPSHOT' to match the naming convention

* fix(re-version.sh): update the name of the liquibase-commercial jar file to include the branch name and SNAPSHOT to differentiate it from other versions

* fix(re-version.sh): replace hardcoded 'master' branch name with dynamic '$branch' variable to ensure correct version renaming in jar files

* fix(re-version.sh): fix sed command to correctly rename snapshots in jar filenames

The sed command in the script was not correctly replacing the branch-SNAPSHOT and 0-SNAPSHOT strings in the jar filenames. This fix adjusts the sed command to correctly replace the branch-SNAPSHOT and 0-SNAPSHOT strings with the desired version.

* fix(re-version.sh): fix sed command to properly rename jar files with the new version number

---------

Signed-off-by: Alejandro Alvarez <jandroav@icloud.com>
  • Loading branch information
jandroav committed Sep 28, 2023
1 parent 01a0081 commit 49a2bd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/util/re-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ do
(cd $workdir/finalize-jar && jar cfm $workdir/$jar $workdir/tmp-manifest.mf .)

cp $workdir/$jar $outdir
RENAME_SNAPSHOTS=$(ls "$outdir/$jar" | sed -e "s/$branch-SNAPSHOT/$version/g") -e "s/0-SNAPSHOT/$version/g"
RENAME_SNAPSHOTS=$(ls "$outdir/$jar" | sed -e "s/$branch-SNAPSHOT/$version/g" -e "s/0-SNAPSHOT/$version/g")
if [[ "$RENAME_SNAPSHOTS" != "$outdir/$jar" ]]; then
mv -v "$outdir/$jar" "$RENAME_SNAPSHOTS"
fi
Expand All @@ -103,7 +103,7 @@ do
rm -rf $workdir/rebuild

cp $workdir/$jar $outdir
RENAME_JAVADOC_SNAPSHOTS=$(ls "$outdir/$jar" | sed -e "s/$branch-SNAPSHOT/$version/g") -e "s/0-SNAPSHOT/$version/g"
RENAME_JAVADOC_SNAPSHOTS=$(ls "$outdir/$jar" | sed -e "s/$branch-SNAPSHOT/$version/g" -e "s/0-SNAPSHOT/$version/g")
if [[ "$RENAME_JAVADOC_SNAPSHOTS" != "$outdir/$jar" ]]; then
mv -v "$outdir/$jar" "$RENAME_JAVADOC_SNAPSHOTS"
fi
Expand Down

0 comments on commit 49a2bd8

Please sign in to comment.