Cherry-pick a7949173e0
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
This commit is contained in:
parent
4dd85f442b
commit
855ede2069
|
|
@ -44,11 +44,12 @@ cd ..
|
||||||
NPM_PUBLISH_TAG="next"
|
NPM_PUBLISH_TAG="next"
|
||||||
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
||||||
|
|
||||||
if [[ $1 == "--release" ]]; then
|
if [[ -n $(git status -s) ]]; then
|
||||||
if [[ -n $(git status -s) ]]; then
|
|
||||||
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $1 == "--release" ]]; then
|
||||||
# Ensure package version does not contain dash.
|
# Ensure package version does not contain dash.
|
||||||
if [[ "${VERSION}" == *-* ]]; then
|
if [[ "${VERSION}" == *-* ]]; then
|
||||||
echo "ERROR: cannot publish pre-release version with --release flag"
|
echo "ERROR: cannot publish pre-release version with --release flag"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue