From f6549b68fda657da4875a9e7b9461740e8ccd46f Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Thu, 14 Jun 2018 14:55:31 -0700 Subject: [PATCH 1/2] Fixing releasing instructions --- RELEASING.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 044fc12ce298..122504cc22f9 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -67,6 +67,8 @@ Create a Maven settings file ``` +Make sure you are using Maven version 3.3 or higher to support the Nexus plugin required to stage a release. + To push a release version ========================= @@ -87,31 +89,33 @@ To push a release version git commit -m "Release [VERSION HERE]" ``` -6. Make sure you are using Maven version 3.3 or higher to support the Nexus plugin required to stage a release. +6. Create and merge in a PR to reflect the updated project version. + +7. Put the repo in a clean state: a) `mvn clean`, then b) `git clean -x -f -d`. -7. To ensure a clean build, remove *all* Maven targets (including subdirectories not handled by `mvn clean`) by running `rm -rf target */target`. +8. Locally build the repo by running `mvn install -DskipTests`. -8. Run `python utilities/stage_sites.py`. -This script checks out `gh-pages` branch of the repository, builds the documentation site and javadocs, copies them to the branch and commits it. This script does not push the docs and it must be done manually on the later step. The script assumes that there is no directory called `tmp_gh-pages` in the repository root, remove that directory, if exists, before running the script. +9. Run `python utilities/stage_sites.py`. +This script checks out `gh-pages` branch of the repository, builds the documentation site and javadocs, copies them to the branch and commits it. This script does not push the docs and it must be done manually on the later step. The script assumes that there is no directory called `tmp_gh-pages` in the repository root. If it is present, remove it before running the script. -9. Check that you are not trying to release a SNAPSHOT build (the artifacts versions do not have "-SNAPSHOT" suffix) and then run `mvn clean deploy -DskipTests=true --settings ~/.m2/settings.xml -P release` command. It will build and deploy artifacts to the staging repository. +10. Check that you are not trying to release a SNAPSHOT build (the artifacts versions do not have "-SNAPSHOT" suffix) and then run `mvn clean deploy -DskipTests=true --settings ~/.m2/settings.xml -P release` command. It will build and deploy artifacts to the staging repository. -10. Run `mvn nexus-staging:release` to release the artifacts. +11. Run `mvn nexus-staging:release` to release the artifacts. -11. Run `cd tmp_gh-pages && git push && cd ..` to push the previously generated docs (step 8). +12. Run `cd tmp_gh-pages && git push && cd ..` to push the previously generated docs (step 8). -12. Run `rm -rf tmp_gh-pages` to remove the generated docs directory from your local machine. +13. Run `rm -rf tmp_gh-pages` to remove the generated docs directory from your local machine. -13. Publish a release on Github manually. +14. Publish a release on Github manually. Go to the [releases page](https://github.com/GoogleCloudPlatform/google-cloud-java/releases) and open the appropriate release draft. Make sure the "Tag Version" is `vX.Y.Z` and the "Release Title" is `X.Y.Z`, where `X.Y.Z` is the release version as listed in the `pom.xml` files. Add the commits since the last release into the release draft. Try to group them into sections with related changes. Anything that is a breaking change needs to be marked with `*breaking change*`. Such changes are only allowed for alpha/beta modules and `@BetaApi` features. Ensure that the format is consistent with previous releases (for an example, see the [0.1.0 release](https://github.com/GoogleCloudPlatform/google-cloud-java/releases/tag/v0.1.0)). After adding any missing updates and reformatting as necessary, publish the draft. -14. Run `python utilities/bump_versions.py next_snapshot patch` to include "-SNAPSHOT" in the current project version (Alternatively, update the versions in `versions.txt` to the correct versions for the next release.). Then, run `python utilities/replace_versions.py` to update the `pom.xml` files. (If you see updates in `README.md` files at this step, you probably did something wrong.) +15. Run `python utilities/bump_versions.py next_snapshot patch` to include "-SNAPSHOT" in the current project version (Alternatively, update the versions in `versions.txt` to the correct versions for the next release.). Then, run `python utilities/replace_versions.py` to update the `pom.xml` files. (If you see updates in `README.md` files at this step, you probably did something wrong.) -15. Create and merge in another PR to reflect the updated project version. +16. Create and merge in another PR to reflect the updated project version. Improvements ============ From e21a27630f46eb783298fc5bd8bc5358a683bda8 Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Mon, 18 Jun 2018 10:10:54 -0700 Subject: [PATCH 2/2] PR feedback --- RELEASING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index 122504cc22f9..8bbb48ad7779 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -91,7 +91,7 @@ To push a release version 6. Create and merge in a PR to reflect the updated project version. -7. Put the repo in a clean state: a) `mvn clean`, then b) `git clean -x -f -d`. +7. Run `git clean -x -f -d` to put the repo in a clean state. 8. Locally build the repo by running `mvn install -DskipTests`.