From a681d2c4a872cfb7f1e422b40b1f17e50ac53258 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 19 Mar 2021 09:24:45 -0600 Subject: [PATCH] Add `prepare_release.ps1` script Fixes #1195 --- prepare_release.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 prepare_release.ps1 diff --git a/prepare_release.ps1 b/prepare_release.ps1 new file mode 100644 index 000000000..d5dc21d6f --- /dev/null +++ b/prepare_release.ps1 @@ -0,0 +1,14 @@ +# Calculate the NPM package version, assuming the version change is in a new commit. +git commit --allow-empty -m "Dummy commit" -q +$NpmPackageVersion = (nbgv get-version -f json | ConvertFrom-Json).NpmPackageVersion +git reset --mixed HEAD~ -q + +# Stamp the version into the package.json file and commit. +pushd $PSScriptRoot/src/MessagePack.UnityClient/Assets/Scripts/MessagePack +npm version $NpmPackageVersion --no-git-tag-version --allow-same-version +git add package.json +popd +git commit -m "Stamp unity package version as $NpmPackageVersion" + +# Tag the release +nbgv tag