From 105037ef7981b40c1fcf2af07726f09b4f230c2b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sat, 22 Feb 2020 09:20:26 +0800 Subject: [PATCH] - 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` --- .gitmodules | 6 +++++- docs/ReleaseInstructions.md | 5 +++-- package.json | 2 +- releases/svg-edit-6.0.0 | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) create mode 160000 releases/svg-edit-6.0.0 diff --git a/.gitmodules b/.gitmodules index d0c0209a..ea0f376f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -85,4 +85,8 @@ [submodule "releases/latest"] path = releases/latest 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 diff --git a/docs/ReleaseInstructions.md b/docs/ReleaseInstructions.md index 3779b0d3..284e4f36 100644 --- a/docs/ReleaseInstructions.md +++ b/docs/ReleaseInstructions.md @@ -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 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` -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 diff --git a/package.json b/package.json index 590caf58..96cfb4a2 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "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", + "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-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", diff --git a/releases/svg-edit-6.0.0 b/releases/svg-edit-6.0.0 new file mode 160000 index 00000000..334dc09c --- /dev/null +++ b/releases/svg-edit-6.0.0 @@ -0,0 +1 @@ +Subproject commit 334dc09c6354d37e4f57380a44b3818527befc7c