From 9ce26bafc809a93df944332a039d1c10a6b9fb6a Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Fri, 21 Feb 2020 10:45:49 +0800 Subject: [PATCH] - Docs: Update `ReleaseInstructions` per new procedures --- docs/ReleaseInstructions.md | 43 ++++++++++++++----------------------- package.json | 2 ++ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/docs/ReleaseInstructions.md b/docs/ReleaseInstructions.md index b3e511d0..6218f133 100644 --- a/docs/ReleaseInstructions.md +++ b/docs/ReleaseInstructions.md @@ -12,44 +12,31 @@ published and taking into account `.npmignore`. ## Update the main project - + 1. Update `version` in `package.json` (and `package-lock.json` (via `npm i`)). 1. Update the CHANGES file with a summary of all changes. 1. Add new release info to `Recent news` section in README -1. Commit these changes -. -1. Tag the version, prefixed by "v", e.g., `v5.1.0`. +1. Commit these changes `git commit -m "Updating CHANGES for release X.Y.Z"`-->. +1. Tag the version, prefixed by "v", e.g., `v6.0.0`. The above steps can be done on a fork and committed via a pull request. -## Create the release on `SVG-Edit.github.io` - +## Create the release as a submodule -1. Go to a clone of the latest . -1. Run the `build.js` executable (`npm run build` if within the project root - directory); **Please note: this script currently assumes that one has this - repo within a folder that is in a sibling directory to a folder named - `svgedit` that is on the `master` branch and whose files and version info - will be copied over to the SVG-Edit.github.io repo in making the "latest" - and specific version builds** -1. Commit these changes with `git commit -m "Updating files for release X.Y.Z"`. -1. Switch back to the `master` branch with `git checkout master`. -1. Ensure this step worked by visiting +1. Create a branch for the release, e.g., `git branch release-v6.0.0` +1. While still on `master`, add the branch to `.gitsubmodules`: + `VERSION=6.0.0 npm run add-release` + +1. Run `git submodule update --init --recursive` +1. Commit these changes `git commit -m "Updating for release X.Y.Z"`-->. +1. Push to `master`. +1. Ensure the new release is available by visiting (and in an ES6-Module-compliant browser, ). -The above steps can be done on a fork and committed via a pull request. - ## Create the release on GitHub - + 1. Go to and select `Draft a new release`. 1. Make the release target point at the tag where the @@ -66,4 +53,6 @@ You will need to be a member of the SVG-Edit GitHub group to do this step. 1. `npm publish` -You will need to be a member of the npm group to do this step. +You will need to be a member of the npm group to do this step. You can run +`npm publish --dry-run` to confirm that the files being included are all desired, +and add to `.npmignore` if not. diff --git a/package.json b/package.json index 47d57ac4..43aa9a8b 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "node": ">=8.5.0" }, "scripts": { + "add-release": "git submodule add -b \"release-v$VERSION\" https://github.com/SVG-Edit/svgedit.git \"releases/svg-edit-$VERSION\" && git submodule set-branch -b \"release-v$VERSION\" releases/latest", + "start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'", "start-embedded": "run-p start start-allow-origin", "start": "echo \"Open file, e.g., to http://localhost:8000/editor/svg-editor-es.html\" && static -p 8000",