Skip to content

Commit

Permalink
Add prepare_release.ps1 script
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Mar 19, 2021
1 parent cd0bfa0 commit a681d2c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions prepare_release.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a681d2c

Please sign in to comment.