Skip to content

Commit

Permalink
Release script improvement
Browse files Browse the repository at this point in the history
Minor fixes in version number in tag, publish and md5.
  • Loading branch information
fxprunayre committed Jun 19, 2024
1 parent 48a2d43 commit e0e531b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ currentversion=${projectVersion}
previousversion=${previousVersionNumber}
nextversion=${nextVersionNumber}-SNAPSHOT
echo "Buuilding release for version ${newversion} (from ${currentversion})."
echo "Building release for version ${newversion} (from ${currentversion})."
echo ""
echo "Before you start:"
echo "1. Use web-ui/download-from-transifex.sh to update translations"
Expand All @@ -60,7 +60,7 @@ read -p "Press enter to continue"
# Then commit the new version
git add .
git commit -m "Update version to $newversion"
git tag -a $version -m "Tag for $version release"
git tag -a $mainVersion -m "Tag for $newversion release"
# Build the new release
mvn clean install -DskipTests -ntp -Pwar -Pwro4j-prebuild-cache
Expand All @@ -78,8 +78,8 @@ fi
if [[ ${OSTYPE:0:6} == 'darwin' ]]; then
md5 -r web/target/geonetwork.war > web/target/geonetwork.war.md5
md5 -r release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip > release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip.md5
md5 -r release/target/GeoNetwork-$nextVersionNumber/geonetwork-bundle-$newversion.zip > release/target/GeoNetwork-$nextVersionNumber/geonetwork-bundle-$newversion.zip.md5
else
(cd web/target && md5sum geonetwork.war > geonetwork.war.md5)
(cd release/target/GeoNetwork-$version && md5sum geonetwork-bundle-$newversion.zip > geonetwork-bundle-$newversion.zip.md5)
(cd release/target/GeoNetwork-$nextVersionNumber && md5sum geonetwork-bundle-$newversion.zip > geonetwork-bundle-$newversion.zip.md5)
fi
3 changes: 2 additions & 1 deletion release-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sftp $sourceforge_username,[email protected] << EOT
cd /home/frs/project/g/ge/geonetwork/GeoNetwork_opensource
mkdir v${version}
cd v${version}
put docs/changes/changes{$version}-0.txt
put docs/changes/changes${version}-0.txt
put release/target/GeoNetwork*/geonetwork-bundle*.zip*
put web/target/geonetwork.war*
put datastorages/*/target/*.zip
Expand All @@ -53,3 +53,4 @@ EOT
# Deploy to osgeo repository (requires credentials in ~/.m2/settings.xml)
mvn deploy -DskipTests -Drelease
7 changes: 7 additions & 0 deletions release-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ currentversion=${projectVersion}
previousversion=${previousVersionNumber}
nextversion=${nextVersionNumber}-SNAPSHOT
echo "Update version number to ${nextversion} (from ${newversion})."
echo ""
echo "After update. Push changes to Git branch ${gitBranch}."
read -p "Press enter to continue"
# Set version number to SNAPSHOT
./update-version.sh $newversion $nextversion
Expand Down

0 comments on commit e0e531b

Please sign in to comment.