Commit 46eba2bb authored by Robert Knight's avatar Robert Knight

Replace postversion script with direct call to create-github-release.js

`yarn version` does not run the "postversion" script when called with
`--no-git-tag-version`.
parent e900bc61
...@@ -145,6 +145,7 @@ node { ...@@ -145,6 +145,7 @@ node {
// Bump the package version and create the GitHub release. // Bump the package version and create the GitHub release.
sh "yarn version --no-git-tag-version --new-version ${newPkgVersion}" sh "yarn version --no-git-tag-version --new-version ${newPkgVersion}"
sh "scripts/create-github-release.js"
// Publish the updated package to the npm registry. // Publish the updated package to the npm registry.
// Use `npm` rather than `yarn` for publishing. // Use `npm` rather than `yarn` for publishing.
......
...@@ -148,7 +148,6 @@ ...@@ -148,7 +148,6 @@
"test": "gulp test", "test": "gulp test",
"report-coverage": "codecov -f coverage/coverage-final.json", "report-coverage": "codecov -f coverage/coverage-final.json",
"version": "make clean build/manifest.json", "version": "make clean build/manifest.json",
"postversion": "./scripts/postversion.sh",
"prepublish": "yarn run build" "prepublish": "yarn run build"
} }
} }
#!/bin/sh
set -eu
cd "$(dirname "$0")"
# Skip GitHub release creation for QA releases.
is_prerelease=$(node -p "require('../package.json').version.includes('-')")
if [ $is_prerelease = "true" ]; then
echo "Skipping GitHub release creation for pre-release"
exit 0
fi
./create-github-release.js
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment