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.2
minorversion=0
newversion=$version-$minorversion
currentversion=3.0.2-SNAPSHOT
previousversion=3.0.1
nextversion=3.0.3-SNAPSHOT
modules=( "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/master

# Move into it if it exist
git checkout $versionbranch
  1. Update version number
./update-version.sh $currentversion $newversion
  1. Generate list of changes
cat <<EOF > docs/changes$newversion.txt
================================================================================
===
=== GeoNetwork $version: List of changes
===
================================================================================
EOF
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 installer
ant
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
./update-version.sh $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">
  <list>
    <value>WEB-INF/classes/setup/sql/migrate/v303/migrate-</value>
  </list>
</entry>

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:
md5sum web/target/geonetwork.war > web/target/geonetwork.war.md5
md5sum geonetwork-$newversion/geonetwork-install-$newversion.jar > geonetwork-$newversion/geonetwork-install-$newversion.jar.md5
  • 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,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/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
bye
  1. Add changes to the documentation https://github.com/geonetwork/website
  1. Update the following files in the website https://github.com/geonetwork/website
  1. Publish the website