Doing a GeoNetwork release

This section documents the steps followed by the development team to do a new release.

Once the release branch has been thoroughly tested and is stable a release can be made.

  1. Get the branch
versionbranch=3.0.x
version=3.0.0
minorversion=0
newversion=$version-$minorversion
currentversion=3.0.0-SNAPSHOT
previousversion=2.10.x
modules=( "geoserver" "e2e-tests" )
git clone --recursive https://github.com/geonetwork/core-geonetwork.git \
          geonetwork-$versionbranch
cd geonetwork-$versionbranch
  1. Create or move to the branch for the version
# Create it if it does not exist yet
git checkout -b $versionbranch origin/develop

# Move into it if it exist
git checkout $versionbranch
  1. Update version number
./update-version.sh $currentversion $newversion
  1. Build the new release
mvn clean install -DskipTests -Pwith-doc
  1. Create the installer
cd installer
ant
cd ..
  1. Test the installer
cd geonetwork-$version
java -jar geonetwork-$newversion/geonetwork-install-$newversion.jar

# Generate list of changes

cat <<EOF > docs/changes$newversion.txt
================================================================================
===
=== GeoNetwork $version: List of changes
===
================================================================================
EOF
git log --pretty='format:- %s' origin/$previousversion... >> docs/changes$newversion.txt
  1. Commit the new version (in submodule first and then in the main module)
cd geoserver
git add .
git commit -m "Update version to $newversion"
cd ..
git add .
git commit -m "Update version to $newversion"
  1. Tag the release
git tag -a $version -m "Tag for $version release"
git push origin $version
  1. Set version number to SNAPSHOT
./update-version.sh $newversion $version-SNAPSHOT
git add .
git commit -m "Update version to $version-SNAPSHOT"
git push origin $versionbranch
  1. Publish in sourceforge
sftp $sourceforge_username,geonetwork@frs.sourceforge.net
# For stable release
cd /home/frs/project/g/ge/geonetwork/GeoNetwork_opensource
# or for RC release
cd /home/frs/project/g/ge/geonetwork/cd GeoNetwork_unstable_development_versions/
mkdir 3.0.0
cd 3.0.0
put docs/changes$newversion.txt
put geonetwork*/*.jar
put web/target/geonetwork.war

See also

Branches are not created for submodule. It may be relevant if the release plan to make major changes in them.

for i in "${modules[@]}"
do
      cd $i; git checkout -b $versionbranch origin/develop; cd ..
done