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=( "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/$versionbranch

# 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

7 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. Commit the new version (in submodule first and then in the main module)
# Only if GeoServer version changed
cd geoserver
git add .
git commit -m "Update version to $newversion"
cd ..

# Then commit the new version
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 $nextversion


# Only if GeoServer version changed
cd geoserver
git add .
git commit -m "Update version to $nextversion"
cd ..


git add .
git commit -m "Update version to $nextversion"



# Only if GeoServer version changed
cd geoserver
git push origin $versionbranch
cd ..


git push origin $versionbranch
  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. Merge in depending branches

If needed, merge the changes into the develop branch.

  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 v3.0.0
cd v3.0.0
put docs/changes3.0.0-0.txt
put geonetwork*/*.jar
put web/target/geonetwork.war
bye