Doing a GeoNetwork release
Doing a release with scripts
Update Translations
- Update translations:
Commit the changed files:
Release Notes
-
Prepare change-log notes.
Git notes are managed in
ref/notes/commits
similar to push and pulling tags. Start by pulling the latest notes:Review changes along with any notes:
Use
git note append
to document commits adding major features.Use
git note remove
if you need to clear a note and start again:Preview changes using:
Save your notes:
-
Generate release notes:
After the script runs it will produces:
-
docs/changes/changes4.4.4-0.txt
The last couple commits here can be removed (from the release steps above).
-
docs/manual/docs/overview/change-log/version-4.4.4.md
This file can be updated based on highlights from: milestone closed issues
Filter using:
- label:
changelog
as Major Features - label: api change
- label:
index structure change
as Index - label:
bug
as Fixes
- label:
-
Update the navigation:
-
docs/manual/mkdocs.yml
docs/manual/docs/overview/change-log/latest/index.md
Build the release locally
-
Use release build script:
-
Startup Elasticsearch
-
Remove local database:
-
Test the release:
-
Smoke Test:
- Load ISO19139 samples and templates
- Display a record and try each of the views, and the XML download
- Use Contributor board to create a new record (from the "preferred" template)
- Try validation (validation errors are expected we just wish to check it runs)
- Try each of the editor views
Publish the release
-
Publish
-
Cleanup
Doing a manual 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.
The following script can be used on Linux and Mac. For this a running build environment is needed with the following utilities: sed, xmlstarlet and sftp.
-
Prepare the release (examples prepairs version 4.4.1 as latest release):
# Setup properties from=origin frombranch=origin/main series=4.4 versionbranch=$series.x version=4.4.1 minorversion=0 release=latest newversion=$version-$minorversion currentversion=4.4.1-SNAPSHOT previousversion=4.4.0 nextversion=4.4.2-SNAPSHOT nextMajorVersion=4.6.0-SNAPSHOT # Get the branch git clone --recursive https://github.com/geonetwork/core-geonetwork.git \ geonetwork-$versionbranch cd geonetwork-$versionbranch # Create or move to the branch for the version # Create it if it does not exist yet git checkout -b $versionbranch $frombranch # or move into it if it exist # git checkout $versionbranch # or stay in main branch if the release is on main # Update version number (in pom.xml, installer config and SQL) ./update-version.sh $currentversion $newversion # Generate list of changes cat <<EOF > docs/changes/changes$newversion.txt ================================================================================ === === GeoNetwork $version: List of changes === ================================================================================ EOF git log --pretty='format:- %s' $previousversion... >> docs/changes/changes$newversion.txt
-
Prepare change-log notes.
Git notes are managed in
ref/notes/commits
similar to push and pulling tags. Start by pulling the latest notes:Review changes along with any notes:
Use
git note append
to document commits adding major features.Use
git note remove
if you need to clear a note and start again:Preview changes using:
Save your notes:
-
Create change log page:
docs/manual/docs/overview/change-log/
cat <<EOF > docs/manual/docs/overview/change-log/version-$version.md # Version $version GeoNetwork $version is a minor release. ## Migration notes ### API changes ### Installation changes ### Index changes ## List of changes Major changes: EOF git log --pretty='format:* %N' $previousversion.. | grep -v "^* $" >> docs/manual/docs/overview/change-log/version-$version.md cat <<EOF > docs/manual/docs/overview/change-log/version-$version.md and more \... see [$version issues](https://github.com/geonetwork/core-geonetwork/issues?q=is%3Aissue+milestone%3A$version+is%3Aclosed) and [pull requests](https://github.com/geonetwork/core-geonetwork/pulls?page=3&q=is%3Apr+milestone%3A$version+is%3Aclosed) for full details. EOF
Fill in the above markdown file, removing any unused headings.
-
Update links and navigation:
docs/manual/mkdocs.yml
docs/manual/docs/overview/change-log/index.md
docs/manual/docs/overview/change-log/latest.md
docs/manual/docs/overview/change-log/stable.md
docs/manual/docs/overview/change-log/archive.md
Test documentation locally:
Once running check the new page: -
Commit & tag the new version
-
Build
# deep clean mvn clean:clean@reset # Build the new release mvn install -Drelease # Create a minimal war (with only the default datasources) cd web mvn clean install -DskipTests -Pwar -Pwro4j-prebuild-cache # Download Jetty and create the installer cd ../release mvn clean install -Pjetty-download,bundle # Deploy to osgeo repository (requires credentials in ~/.m2/settings.xml) cd .. mvn deploy -Drelease
-
Test
-
Set the next version
# Set version number to SNAPSHOT ./update-version.sh $newversion $nextversion nextversionnosnapshot=${nextversion//[-SNAPSHOT]/} # Add SQL migration step for the next version mkdir web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v${nextversionnosnapshot//[.]/} cat <<EOF > web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v${nextversionnosnapshot//[.]/}/migrate-default.sql UPDATE Settings SET value='${nextversionnosnapshot}' WHERE name='system/platform/version'; UPDATE Settings SET value='SNAPSHOT' WHERE name='system/platform/subVersion'; EOF vi web/src/main/webResources/WEB-INF/config-db/database_migration.xml
In
WEB-INF/config-db/database_migration.xml
add an entry for the new version in the 2 steps: -
Publishing
-
Generate checksum files
-
If using Linux:
-
If using Mac OS X:
On sourceforge first:
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 v4.4.1 cd v4.4.1 put docs/changes/changes4.4.1-0.txt put release/target/GeoNetwork*/geonetwork-bundle*.zip* put web/target/geonetwork.war* bye
-
-
Close the milestone on github https://github.com/geonetwork/core-geonetwork/milestones?state=closed with link to sourceforge download.
Publish the release on github https://github.com/geonetwork/core-geonetwork/releases .
Update the website links https://github.com/geonetwork/website .
- Add the changes file for the release to https://github.com/geonetwork/doc/tree/develop/source/overview/change-log
- List the previous file in https://github.com/geonetwork/doc/blob/develop/source/overview/change-log/index.rst
- Update the version: https://github.com/geonetwork/website/blob/master/docsrc/conf.py
- Update the download link: https://github.com/geonetwork/website/blob/master/docsrc/downloads.rst
- Add the section for the new release: https://github.com/geonetwork/website/blob/master/docsrc/news.rst
Send an email to the mailing lists.
-
Merge in depending branches
If a major version, then master version has to be updated to the next one (eg. if 3.8.0, then 3.7.x is 3.9.x).
# Create it if it does not exist yet git checkout master ./update-version.sh $currentversion $nextMajorVersion
Update documentation to reflect series change of
latest
,stable
,maintenance
andarchive
:docs/manual/mkdocs.yml
navigation changes as branches change roledocs/manual/docs/overview/change-log/index.md
docs/manual/docs/overview/change-log/latest.md
docs/manual/docs/overview/change-log/stable.md
docs/manual/docs/overview/change-log/archive.md
Commit the new version