-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs / update versions and fixes in 'Doing a release' page
- Loading branch information
Showing
1 changed file
with
80 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ with the following utilities: sed, xmlstarlet and sftp. | |
``` shell | ||
# Setup properties | ||
frombranch=origin/main | ||
versionbranch=4.2.x | ||
version=4.2.3 | ||
versionbranch=main | ||
version=4.4.1 | ||
minorversion=0 | ||
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 | ||
nextversionNoSnapshot = ${nextversion//-SNAPSHOT/} | ||
nextMajorVersion=4.6.0-SNAPSHOT | ||
|
||
# Get the branch | ||
git clone --recursive https://github.com/geonetwork/core-geonetwork.git \ | ||
|
@@ -71,7 +71,7 @@ with the following utilities: sed, xmlstarlet and sftp. | |
# Download Jetty and create the installer | ||
cd release | ||
mvn clean install -Djetty-download | ||
mvn clean install -Pjetty-download | ||
ant | ||
|
@@ -94,6 +94,43 @@ 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/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 | ||
``` | ||
In `WEB-INF/config-db/database_migration.xml` add an entry for the new version: | ||
``` shell | ||
line=$(grep -n '</beans>' web/src/main/webResources/WEB-INF/config-db/database_migration.xml | cut -d: -f1) | ||
finalLine=$(($line - 2)) | ||
if [[ ${OSTYPE:0:6} == 'darwin' ]]; then | ||
sedopt='-i .bak' | ||
else | ||
sedopt='-i' | ||
fi | ||
sed $sedopt "${finalLine} a\\ | ||
<entry key=\"${nextversionNoSnapshot}\">\\ | ||
<list>\\ | ||
<value>WEB-INF/classes/setup/sql/migrate/v${nextversionNoSnapshot//[.]/}/migrate-</value>\\ | ||
</list>\\ | ||
</entry> | ||
" web/src/main/webResources/WEB-INF/config-db/database_migration.xml | ||
if [[ ${OSTYPE:0:6} == 'darwin' ]]; then | ||
rm web/src/main/webResources/WEB-INF/config-db/database_migration.xml.bak | ||
fi | ||
``` | ||
Commit the changes: | ||
``` shell | ||
git add . | ||
git commit -m "Update version to $nextversion" | ||
|
@@ -107,37 +144,41 @@ with the following utilities: sed, xmlstarlet and sftp. | |
git push origin $version | ||
``` | ||
7. Generate checksum files | ||
- If using Linux: | ||
``` shell | ||
cd web/target && md5sum geonetwork.war > geonetwork.war.md5 && cd ../.. | ||
cd release/target/GeoNetwork-$version && md5sum geonetwork-bundle-$newversion.zip > geonetwork-bundle-$newversion.zip.md5 && cd ../../.. | ||
``` | ||
- If using Mac OS X: | ||
``` shell | ||
md5 -r web/target/geonetwork.war > web/target/geonetwork.war.md5 | ||
md5 -r release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip > release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip.md5 | ||
``` | ||
On sourceforge first: | ||
``` shell | ||
sftp $sourceforge_username,[email protected] | ||
# 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.12.1 | ||
cd v3.12.1 | ||
put docs/changes3.12.1-0.txt | ||
put release/target/GeoNetwork*/geonetwork-bundle*.zip* | ||
put web/target/geonetwork.war* | ||
bye | ||
``` | ||
7. Generate checksum files | ||
- If using Linux: | ||
``` shell | ||
cd web/target && md5sum geonetwork.war > geonetwork.war.md5 && cd ../.. | ||
cd release/target/GeoNetwork-$version && md5sum geonetwork-bundle-$newversion.zip > geonetwork-bundle-$newversion.zip.md5 && cd ../../.. | ||
``` | ||
- If using Mac OS X: | ||
``` shell | ||
md5 -r web/target/geonetwork.war > web/target/geonetwork.war.md5 | ||
md5 -r release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip > release/target/GeoNetwork-$newversion/geonetwork-bundle-$newversion.zip.md5 | ||
``` | ||
On sourceforge first: | ||
``` shell | ||
# Set your sourceforge username | ||
sourceforge_username=XXXXX | ||
sftp $sourceforge_username,[email protected] << EOT | ||
# 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 v${version} | ||
cd v${version} | ||
put docs/changes{$newversion}.txt | ||
put release/target/GeoNetwork*/geonetwork-bundle*.zip* | ||
put web/target/geonetwork.war* | ||
bye | ||
EOT | ||
``` | ||
8. Update or add the changelog in the documentation <https://github.com/geonetwork/doc> . | ||
|