chore: check for clean working directory before release

This commit is contained in:
Gregor Kleen 2019-07-26 12:11:13 +02:00
parent 062361dc8a
commit e1b3c46356
2 changed files with 7 additions and 1 deletions

6
is-clean.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if ! ( output=$(git status --porcelain) && [ -z "$output" ] ); then
echo "Working directory isn't clean" >&2
exit 1
fi

View File

@ -20,7 +20,7 @@
"frontend:test:watch": "karma start --conf karma.conf.js --single-run false",
"frontend:build": "webpack",
"frontend:build:watch": "webpack --watch",
"prerelease": "npm run test",
"prerelease": "./is-clean.sh && npm run test",
"release": "standard-version -a",
"postrelease": "git push --follow-tags origin master"
},