diff --git a/.gitignore b/.gitignore index 265f74f1dc0..047cf25473c 100644 --- a/.gitignore +++ b/.gitignore @@ -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_* diff --git a/docs/README.md b/docs/README.md index 67dc7dd7004..79b0e5b4afd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/changes2.1.x.txt b/docs/changes/changes2.1.x.txt similarity index 100% rename from docs/changes2.1.x.txt rename to docs/changes/changes2.1.x.txt diff --git a/docs/changes2.10.x.txt b/docs/changes/changes2.10.x.txt similarity index 100% rename from docs/changes2.10.x.txt rename to docs/changes/changes2.10.x.txt diff --git a/docs/changes2.2.x.txt b/docs/changes/changes2.2.x.txt similarity index 100% rename from docs/changes2.2.x.txt rename to docs/changes/changes2.2.x.txt diff --git a/docs/changes2.4.x.txt b/docs/changes/changes2.4.x.txt similarity index 100% rename from docs/changes2.4.x.txt rename to docs/changes/changes2.4.x.txt diff --git a/docs/changes2.6.x.txt b/docs/changes/changes2.6.x.txt similarity index 100% rename from docs/changes2.6.x.txt rename to docs/changes/changes2.6.x.txt diff --git a/docs/changes2.8.x.txt b/docs/changes/changes2.8.x.txt similarity index 100% rename from docs/changes2.8.x.txt rename to docs/changes/changes2.8.x.txt diff --git a/docs/changes3.0.0-0.txt b/docs/changes/changes3.0.0-0.txt similarity index 100% rename from docs/changes3.0.0-0.txt rename to docs/changes/changes3.0.0-0.txt diff --git a/docs/changes3.0.1-0.txt b/docs/changes/changes3.0.1-0.txt similarity index 100% rename from docs/changes3.0.1-0.txt rename to docs/changes/changes3.0.1-0.txt diff --git a/docs/changes3.0.2-0.txt b/docs/changes/changes3.0.2-0.txt similarity index 100% rename from docs/changes3.0.2-0.txt rename to docs/changes/changes3.0.2-0.txt diff --git a/docs/changes3.0.3-0.txt b/docs/changes/changes3.0.3-0.txt similarity index 100% rename from docs/changes3.0.3-0.txt rename to docs/changes/changes3.0.3-0.txt diff --git a/docs/changes3.0.4-0.txt b/docs/changes/changes3.0.4-0.txt similarity index 100% rename from docs/changes3.0.4-0.txt rename to docs/changes/changes3.0.4-0.txt diff --git a/docs/changes3.0.5-0.txt b/docs/changes/changes3.0.5-0.txt similarity index 100% rename from docs/changes3.0.5-0.txt rename to docs/changes/changes3.0.5-0.txt diff --git a/docs/changes3.10.0-0.txt b/docs/changes/changes3.10.0-0.txt similarity index 100% rename from docs/changes3.10.0-0.txt rename to docs/changes/changes3.10.0-0.txt diff --git a/docs/changes3.10.1-0.txt b/docs/changes/changes3.10.1-0.txt similarity index 100% rename from docs/changes3.10.1-0.txt rename to docs/changes/changes3.10.1-0.txt diff --git a/docs/changes3.10.2-0.txt b/docs/changes/changes3.10.2-0.txt similarity index 100% rename from docs/changes3.10.2-0.txt rename to docs/changes/changes3.10.2-0.txt diff --git a/docs/changes3.10.3-0.txt b/docs/changes/changes3.10.3-0.txt similarity index 100% rename from docs/changes3.10.3-0.txt rename to docs/changes/changes3.10.3-0.txt diff --git a/docs/changes3.10.4-0.txt b/docs/changes/changes3.10.4-0.txt similarity index 100% rename from docs/changes3.10.4-0.txt rename to docs/changes/changes3.10.4-0.txt diff --git a/docs/changes3.10.5-0.txt b/docs/changes/changes3.10.5-0.txt similarity index 100% rename from docs/changes3.10.5-0.txt rename to docs/changes/changes3.10.5-0.txt diff --git a/docs/changes3.10.6-0.txt b/docs/changes/changes3.10.6-0.txt similarity index 100% rename from docs/changes3.10.6-0.txt rename to docs/changes/changes3.10.6-0.txt diff --git a/docs/changes3.12.0-0.txt b/docs/changes/changes3.12.0-0.txt similarity index 100% rename from docs/changes3.12.0-0.txt rename to docs/changes/changes3.12.0-0.txt diff --git a/docs/changes3.2.0-0.txt b/docs/changes/changes3.2.0-0.txt similarity index 100% rename from docs/changes3.2.0-0.txt rename to docs/changes/changes3.2.0-0.txt diff --git a/docs/changes3.2.1-0.txt b/docs/changes/changes3.2.1-0.txt similarity index 100% rename from docs/changes3.2.1-0.txt rename to docs/changes/changes3.2.1-0.txt diff --git a/docs/changes3.2.2-0.txt b/docs/changes/changes3.2.2-0.txt similarity index 100% rename from docs/changes3.2.2-0.txt rename to docs/changes/changes3.2.2-0.txt diff --git a/docs/changes3.4.0-0.txt b/docs/changes/changes3.4.0-0.txt similarity index 100% rename from docs/changes3.4.0-0.txt rename to docs/changes/changes3.4.0-0.txt diff --git a/docs/changes3.4.1-0.txt b/docs/changes/changes3.4.1-0.txt similarity index 100% rename from docs/changes3.4.1-0.txt rename to docs/changes/changes3.4.1-0.txt diff --git a/docs/changes3.4.2-0.txt b/docs/changes/changes3.4.2-0.txt similarity index 100% rename from docs/changes3.4.2-0.txt rename to docs/changes/changes3.4.2-0.txt diff --git a/docs/changes3.6.0-0.txt b/docs/changes/changes3.6.0-0.txt similarity index 100% rename from docs/changes3.6.0-0.txt rename to docs/changes/changes3.6.0-0.txt diff --git a/docs/changes3.8.0-0.txt b/docs/changes/changes3.8.0-0.txt similarity index 100% rename from docs/changes3.8.0-0.txt rename to docs/changes/changes3.8.0-0.txt diff --git a/docs/changes3.8.1-0.txt b/docs/changes/changes3.8.1-0.txt similarity index 100% rename from docs/changes3.8.1-0.txt rename to docs/changes/changes3.8.1-0.txt diff --git a/docs/changes3.8.2-0.txt b/docs/changes/changes3.8.2-0.txt similarity index 100% rename from docs/changes3.8.2-0.txt rename to docs/changes/changes3.8.2-0.txt diff --git a/docs/changes3.8.3-0.txt b/docs/changes/changes3.8.3-0.txt similarity index 100% rename from docs/changes3.8.3-0.txt rename to docs/changes/changes3.8.3-0.txt diff --git a/docs/changes4.0.0-0.txt b/docs/changes/changes4.0.0-0.txt similarity index 100% rename from docs/changes4.0.0-0.txt rename to docs/changes/changes4.0.0-0.txt diff --git a/docs/changes4.0.0-alpha.1.txt b/docs/changes/changes4.0.0-alpha.1.txt similarity index 100% rename from docs/changes4.0.0-alpha.1.txt rename to docs/changes/changes4.0.0-alpha.1.txt diff --git a/docs/changes4.0.0-alpha.2.txt b/docs/changes/changes4.0.0-alpha.2.txt similarity index 100% rename from docs/changes4.0.0-alpha.2.txt rename to docs/changes/changes4.0.0-alpha.2.txt diff --git a/docs/changes4.0.1-0.txt b/docs/changes/changes4.0.1-0.txt similarity index 100% rename from docs/changes4.0.1-0.txt rename to docs/changes/changes4.0.1-0.txt diff --git a/docs/changes4.0.2-0.txt b/docs/changes/changes4.0.2-0.txt similarity index 100% rename from docs/changes4.0.2-0.txt rename to docs/changes/changes4.0.2-0.txt diff --git a/docs/changes4.0.3-0.txt b/docs/changes/changes4.0.3-0.txt similarity index 100% rename from docs/changes4.0.3-0.txt rename to docs/changes/changes4.0.3-0.txt diff --git a/docs/changes4.0.4-0.txt b/docs/changes/changes4.0.4-0.txt similarity index 100% rename from docs/changes4.0.4-0.txt rename to docs/changes/changes4.0.4-0.txt diff --git a/docs/changes4.0.5-0.txt b/docs/changes/changes4.0.5-0.txt similarity index 100% rename from docs/changes4.0.5-0.txt rename to docs/changes/changes4.0.5-0.txt diff --git a/docs/changes4.0.6-0.txt b/docs/changes/changes4.0.6-0.txt similarity index 100% rename from docs/changes4.0.6-0.txt rename to docs/changes/changes4.0.6-0.txt diff --git a/docs/changes4.2.0-0.txt b/docs/changes/changes4.2.0-0.txt similarity index 100% rename from docs/changes4.2.0-0.txt rename to docs/changes/changes4.2.0-0.txt diff --git a/docs/changes4.2.1-0.txt b/docs/changes/changes4.2.1-0.txt similarity index 100% rename from docs/changes4.2.1-0.txt rename to docs/changes/changes4.2.1-0.txt diff --git a/docs/changes4.2.2-0.txt b/docs/changes/changes4.2.2-0.txt similarity index 100% rename from docs/changes4.2.2-0.txt rename to docs/changes/changes4.2.2-0.txt diff --git a/docs/changes4.2.3-0.txt b/docs/changes/changes4.2.3-0.txt similarity index 100% rename from docs/changes4.2.3-0.txt rename to docs/changes/changes4.2.3-0.txt diff --git a/docs/changes4.2.4-0.txt b/docs/changes/changes4.2.4-0.txt similarity index 100% rename from docs/changes4.2.4-0.txt rename to docs/changes/changes4.2.4-0.txt diff --git a/docs/changes4.2.5-0.txt b/docs/changes/changes4.2.5-0.txt similarity index 100% rename from docs/changes4.2.5-0.txt rename to docs/changes/changes4.2.5-0.txt diff --git a/docs/changes4.4.0-0.txt b/docs/changes/changes4.4.0-0.txt similarity index 100% rename from docs/changes4.4.0-0.txt rename to docs/changes/changes4.4.0-0.txt diff --git a/docs/changes4.4.1-0.txt b/docs/changes/changes4.4.1-0.txt similarity index 100% rename from docs/changes4.4.1-0.txt rename to docs/changes/changes4.4.1-0.txt diff --git a/docs/manual/docs/contributing/doing-a-release.md b/docs/manual/docs/contributing/doing-a-release.md index d738e52e157..00a87de0d03 100644 --- a/docs/manual/docs/contributing/doing-a-release.md +++ b/docs/manual/docs/contributing/doing-a-release.md @@ -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 @@ -41,17 +44,101 @@ with the following utilities: sed, xmlstarlet and sftp. ./update-version.sh $currentversion $newversion # Generate list of changes - cat < docs/changes$newversion.txt + cat < 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 -m "" + ``` + + Use `git note remove` if you need to clear a note and start again: + ``` + git notes remove + ``` + + 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 < 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 < 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 @@ -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 @@ -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 < 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 + + + WEB-INF/classes/setup/sql/migrate/v3122/migrate- + + + ``` + ``` shell git add . git commit -m "Update version to $nextversion" @@ -139,8 +250,6 @@ with the following utilities: sed, xmlstarlet and sftp. bye ``` -8. Update or add the changelog in the documentation . - 9. Close the milestone on github with link to sourceforge download. Publish the release on github . @@ -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 diff --git a/pom.xml b/pom.xml index 0d2ee1c5ac5..dd305e5146c 100644 --- a/pom.xml +++ b/pom.xml @@ -1457,16 +1457,6 @@ - - WEB-INF/config-db/jdbc.properties