- npm: Add `add-release` script (Newer versions of Git might be able to use `set-branch`, but the Git version with Mac does not so using another approach)

- Docs: Fix `ReleaseInstructions.md`
master
Brett Zamir 2020-02-22 09:20:26 +08:00
parent ec881e2362
commit 105037ef79
4 changed files with 10 additions and 4 deletions

6
.gitmodules vendored
View File

@ -85,4 +85,8 @@
[submodule "releases/latest"] [submodule "releases/latest"]
path = releases/latest path = releases/latest
url = https://github.com/SVG-Edit/svgedit.git url = https://github.com/SVG-Edit/svgedit.git
branch = release-v5.1.0 branch = release-v6.0.0
[submodule "releases/svg-edit-6.0.0"]
path = releases/svg-edit-6.0.0
url = https://github.com/SVG-Edit/svgedit.git
branch = release-v6.0.0

View File

@ -24,9 +24,10 @@ The above steps can be done on a fork and committed via a pull request.
## Create the release as a submodule ## Create the release as a submodule
1. Create a branch for the release, e.g., `git branch release-v6.0.0` 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`: 1. While still on `master`, run the following (changing the version). This
will add the branch to `.gitsubmodules` and have it point `latest` to
this new release:
`VERSION=6.0.0 npm run add-release` `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. Commit these changes `git commit -m "Updating for release X.Y.Z"`-->.
1. Push to `master`. 1. Push to `master`.
1. Ensure the new release is available by visiting 1. Ensure the new release is available by visiting

View File

@ -13,7 +13,7 @@
"node": ">=8.5.0" "node": ">=8.5.0"
}, },
"scripts": { "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", "add-release": "git submodule add -b \"release-v$VERSION\" https://github.com/SVG-Edit/svgedit.git \"releases/svg-edit-$VERSION\" && git config --file=.gitmodules submodule.releases/latest.branch \"release-v$VERSION\"",
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'", "start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start-embedded": "run-p start start-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", "start": "echo \"Open file, e.g., to http://localhost:8000/editor/svg-editor-es.html\" && static -p 8000",

@ -0,0 +1 @@
Subproject commit 334dc09c6354d37e4f57380a44b3818527befc7c