jdaugherty commented on code in PR #16486: URL: https://github.com/apache/grails-core/pull/16486#discussion_r4175050490
########## RELEASE.md: ########## @@ -339,8 +380,14 @@ The bundle is `grails-forge-web-netty/build/distributions/grails-forge-web-netty ### Publish `grails-core` documentation -Open the release workflow in `grails-core` and approve the `Publish Documentation` step. Wait until finished, and a -workflow should eventually kick off in `grails-doc` to publish to https://github.com/apache/grails-website/tree/asf-site-production/docs and https://grails.apache.org/docs/. +Open the release workflow in `grails-core` and approve the `Publish Documentation` step. The step does not rebuild the +documentation. It downloads the voted `apache-grails-<version>-docs.zip` from dist.apache.org, verifies its checksum and +signature, and publishes the extracted `html` folder to https://github.com/apache/grails-website/tree/asf-site-production/docs, +which serves https://grails.apache.org/docs/. It takes the zip from the `release` area once the distributions have been +moved, and from the `dev` area until then. + +To correct the documentation of a version that is already released, run the `Release - Publish Documentation` workflow Review Comment: Fixed in ddc6af6409. `Release - Publish Documentation` now fails before building unless the branch's `projectVersion` equals the requested version, and RELEASE.md says to run corrections from a branch created from the release tag. That route stays separate from the voted-zip publish in `release.yml`. ########## .github/scripts/setReleasedGrailsVersion.sh: ########## @@ -24,4 +24,11 @@ set -e echo "Setting new version in GrailsUtilsTests.java: ${RELEASE_VERSION}" sed -i "s/assertEquals(\".*$/assertEquals(\"${RELEASE_VERSION}\", GrailsUtil.getGrailsVersion());/" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java" sed -n "/assertEquals(\".*/p" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java" -git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java" \ No newline at end of file +git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java" + +# The documentation links each page to its source on this branch. Record the branch in the +# release commit so a build from the source distribution renders the same links. +echo "Setting githubBranch in gradle.properties: ${TARGET_BRANCH:?TARGET_BRANCH must be set}" +sed -i "s/^githubBranch=.*$/githubBranch=${TARGET_BRANCH}/" "${GITHUB_WORKSPACE}/gradle.properties" Review Comment: Fixed in ddc6af6409. The substitution uses `:`, which git does not allow in a branch name, and the script fails unless `gradle.properties` ends up with `githubBranch=<TARGET_BRANCH>`. ########## grails-doc/build.gradle: ########## @@ -757,8 +763,18 @@ docsTask.configure { Sync it -> } tasks.register('dist', Zip).configure { Zip it -> - it.dependsOn(docsTask) - it.from(outputDir) + it.archiveBaseName = 'apache-grails' + it.archiveClassifier = 'docs' + it.into("apache-grails-${project.version}-docs") { CopySpec distribution -> + distribution.from(project.layout.projectDirectory.dir('distribution-artifacts')) { CopySpec legal -> + legal.filesMatching('NOTICE') { FileCopyDetails notice -> Review Comment: Fixed in ddc6af6409. `dist` declares the year with `inputs.property('noticeYear', …)`. Before the change, a build with a different `SOURCE_DATE_EPOCH` year left `dist` UP-TO-DATE with the old NOTICE; it now reruns. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
