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
modules=( "e2e-tests" )
git clone --recursive \
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/master

# Move into it if it exist
git checkout $versionbranch
  1. Update version number
./ $currentversion $newversion
  1. Generate list of changes
cat <<EOF > docs/changes$newversion.txt
=== GeoNetwork $version: List of changes
git log --pretty='format:- %s' $previousversion... >> docs/changes$newversion.txt
  1. Build the new release
mvn clean install -DskipTests -Pwith-doc -Des.spring.profile=es -Des.url=
  1. Create the installer
cd release
mvn clean install -Djetty-download
cd ../installer
cd ..
  1. Re-build the new release

This is required as previous step creates a file WEB-INF/server.prop, otherwise the old version will be added to the war file. This should be improved.

mvn clean install -DskipTests -Pwith-doc -Des.spring.profile=es -Des.url=
  1. Commit the new version (in submodule first and then in the main module)
# Then commit the new version
git add .
git commit -m "Update version to $newversion"
  1. Test the installer
cd geonetwork-$version
java -jar geonetwork-$newversion/geonetwork-install-$newversion.jar
  1. Tag the release
git tag -a $version -m "Tag for $version release"
git push origin $version
  1. Set version number to SNAPSHOT
./ $newversion $nextversion
  1. Add migration script for the next version.

In WEB-INF/config-db/database_migration.xml add an entry for the new version:

<entry key="3.0.3">

In WEB-INF/classes/setup/sql/migrate, create the SQL migration script:

UPDATE Settings SET value='3.0.3' WHERE name='system/platform/version';
UPDATE Settings SET value='SNAPSHOT' WHERE name='system/platform/subVersion';
  1. Commit/Push the changes for the version update.
git add .
git commit -m "Update version to $nextversion"

git push origin $versionbranch
  1. Merge in depending branches

If needed, merge the changes into the develop branch.

  1. Generate checksum files
  • If using Linux:
cd web/target && md5sum geonetwork.war > geonetwork.war.md5 && cd ../..
cd geonetwork-$version && md5sum geonetwork-install-$newversion.jar > geonetwork-install-$newversion.jar.md5 && cd ..
  • If using Mac OS X:
md5 -r web/target/geonetwork.war > web/target/geonetwork.war.md5
md5 -r geonetwork-$newversion/geonetwork-install-$newversion.jar > geonetwork-$newversion/geonetwork-install-$newversion.jar.md5
  1. Publish in sourceforge
sftp $sourceforge_username,
# For stable release
cd /home/frs/project/g/ge/geonetwork/GeoNetwork_opensource
# or for RC release
cd /home/frs/project/g/ge/geonetwork/GeoNetwork_unstable_development_versions/
mkdir 3.0.0
cd 3.0.0
put docs/changes3.0.0-0.txt
put geonetwork*/*.jar
put geonetwork*/*.md5
put web/target/geonetwork.war
put web/target/geonetwork.war.md5
  1. Add changes to the documentation
  1. Update the following files in the website
  1. Publish the website