Skip to content

Commit

Permalink
build release procedure updates to include docs in release tag (geone…
Browse files Browse the repository at this point in the history
…twork#7412)

* move changes to their own folder

Signed-off-by: Jody Garnett <[email protected]>

* update doing a release for doc updates prior to tagging release

# Conflicts:
#	docs/manual/docs/contributing/doing-a-release.md

* automation used to deploy manual, manual deploy during release not longer required

* changelog management using git notes to document major features

* housekeeping: clean up commented out pom.xml snippet

Signed-off-by: Jody Garnett <[email protected]>

* update docs/README.md description to reflect contents

Signed-off-by: Jody Garnett <[email protected]>

* gitIgnore WEB-INF schemapublication folder

Signed-off-by: Jody Garnett <[email protected]>

* Change to 4.4.1 release example

* Update build procedure to deploy datastorages

Signed-off-by: Jody Garnett <[email protected]>

---------

Signed-off-by: Jody Garnett <[email protected]>
  • Loading branch information
jodygarnett authored Jan 18, 2024
1 parent 22cbf18 commit 95c7005
Show file tree
Hide file tree
Showing 52 changed files with 142 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ web/src/main/webapp/WEB-INF/data/data/metadata_data
web/src/main/webapp/WEB-INF/data/data/metadata_subversion
web/src/main/webapp/WEB-INF/data/data/resources/htmlcache
web/src/main/webapp/WEB-INF/data/data/resources/images
web/src/main/webapp/WEB-INF/data/data/resources/schemapublication
web/src/main/webapp/WEB-INF/data/data/resources/xml
web/src/main/webapp/WEB-INF/data/data/upload/
web/src/main/webapp/WEB-INF/data/harvester_*
Expand Down
11 changes: 5 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Documentation

This module contains:
* `manual` in Markdown format for MkDocs
* `manuals` in RST format for sphinx-build (via https://github.com/geonetwork/doc) - Legacy
* Change logs txt files

* `changes/` change logs txt files
* `manual/` in Markdown format for MkDocs
* `licenses/` for library
* `schema-doc/` folder with scripts to generate extra docs
* [copyright.txt](copyright.txt) Copyright template
* `licenses` for library
* Utility folder with scripts to generate extra docs
* `translate` python module for help with Sphinx-build migration to MkDocs
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
155 changes: 136 additions & 19 deletions docs/manual/docs/contributing/doing-a-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ This section documents the steps followed by the development team to do a new re
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.
with the following utilities: ***sed***, ***xmlstarlet*** and ***sftp***.


1. Prepare the release
1. Prepare the release (examples prepairs version 4.4.1 as latest release):

``` shell
# Setup properties
from=origin
frombranch=origin/main
versionbranch=4.2.x
version=4.2.3
series=4.4
versionbranch=$series.x
version=4.4.1
minorversion=0
release=latest
newversion=$version-$minorversion
currentversion=4.2.3-SNAPSHOT
previousversion=4.2.2
nextversion=4.2.4-SNAPSHOT
nextMajorVersion=4.4.0-SNAPSHOT
currentversion=4.4.1-SNAPSHOT
previousversion=4.4.0
nextversion=4.4.2-SNAPSHOT
nextMajorVersion=4.6.0-SNAPSHOT


# Get the branch
Expand All @@ -41,17 +44,101 @@ with the following utilities: sed, xmlstarlet and sftp.
./update-version.sh $currentversion $newversion

# Generate list of changes
cat <<EOF > docs/changes$newversion.txt
cat <<EOF > docs/changes/changes$newversion.txt
================================================================================
===
=== GeoNetwork $version: List of changes
===
================================================================================
EOF
git log --pretty='format:- %s' $previousversion... >> docs/changes$newversion.txt
git log --pretty='format:- %s' $previousversion... >> docs/changes/changes$newversion.txt
```
2. Commit & tag the new version
2. Prepare change-log notes.
Git notes are managed similar to push and pulling tags. Start by pulling the latest notes:
```
git pull origin refs/notes/commits
```
Review changes along with any notes:
```
git log --pretty='format:%h: %s %n note: %N' $previousversion...
```
Use `git note append` to document commits adding major features.
```
git notes append <sha> -m "<description of major feature>"
```
Use `git note remove` if you need to clear a note and start again:
```
git notes remove <sha>
```
Preview changes using:
```
git log --pretty='format:* %N' $previousversion... | grep -v "^* $"
```
Save your notes:
```
git push origin refs/notes/commits
```
3. Create change log page: `docs/manual/docs/overview/change-log/`
``` shell
cat <<EOF > docs/manual/docs/overview/changes/version-$newversion.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/changes/version-$newversion.md
cat <<EOF > docs/manual/docs/overview/changes/version-$newversion.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.
4. 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:
```
cd docs/manual
mkdocs serve
```
Once running check the new page:
```
open http://localhost:8000/ocverview/change-log/$newversion
```
5. Commit & tag the new version
``` shell
# Then commit the new version
Expand All @@ -65,18 +152,23 @@ with the following utilities: sed, xmlstarlet and sftp.
3. Build
``` shell
# 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 -Djetty-download
ant
cd ../release
mvn clean install -Djetty-download,bundle
# Deploy to osgeo repository (requires credentials in ~/.m2/settings.xml)
mvn deploy
cd ..
mvn deploy -Drelease
```
4. Test
Expand All @@ -94,6 +186,25 @@ with the following utilities: sed, xmlstarlet and sftp.
# Set version number to SNAPSHOT
./update-version.sh $newversion $nextversion
# Add SQL migration step for the next version
mkdir web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v424
cat <<EOF > web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v424/migrate-default.sql
UPDATE Settings SET value='4.2.4' 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:
``` xml
<entry key="3.12.2">
<list>
<value>WEB-INF/classes/setup/sql/migrate/v3122/migrate-</value>
</list>
</entry>
```
``` shell
git add .
git commit -m "Update version to $nextversion"
Expand Down Expand Up @@ -139,8 +250,6 @@ with the following utilities: sed, xmlstarlet and sftp.
bye
```
8. Update or add the changelog in the documentation <https://github.com/geonetwork/doc> .
9. 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> .
Expand All @@ -164,6 +273,14 @@ with the following utilities: sed, xmlstarlet and sftp.
git checkout master
./update-version.sh $currentversion $nextMajorVersion
```
Update documentation to reflect series change of `latest`, `stable`, `maintenance` and `archive`:
* ``docs/manual/mkdocs.yml`` navigation changes as branches change role
* ``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``
Commit the new version
Expand Down
10 changes: 0 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1457,16 +1457,6 @@
</snapshotRepository>
</distributionManagement>

<!--
<distributionManagement>
<snapshotRepository>
<id>scp-repository.geonetwork-opensource.org</id>
<name>GeoNetwork opensource repositories</name>
<url>scpexe://TO DEFINED</url>
</snapshotRepository>
</distributionManagement>
-->

<properties>
<db.properties>WEB-INF/config-db/jdbc.properties</db.properties>
<!--<db.properties>file:/${geonetwork.dir}/jdbc.properties</db.properties>-->
Expand Down

0 comments on commit 95c7005

Please sign in to comment.