release: allows dynamic release as arg
This commit is contained in:
parent
f2b1a1dd3b
commit
6dc66b1c27
@ -25,15 +25,22 @@ if [ -z "$(git status --porcelain)" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
std_version_args=()
|
||||
if [[ -n "${1:-}" ]]; then
|
||||
std_version_args+=( "--release-as" "$1" )
|
||||
echo "Parameter $1 was supplied, so we should use release-as"
|
||||
else
|
||||
echo "No release-as parameter specifed."
|
||||
fi
|
||||
# Working directory clean
|
||||
echo "Doing a dry run..."
|
||||
npx standard-version --dry-run
|
||||
npx standard-version --dry-run "${std_version_args[@]}"
|
||||
read -p "Does that look good? [y/N] " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
# do dangerous stuff
|
||||
npx standard-version
|
||||
npx standard-version "${std_version_args[@]}"
|
||||
git push --follow-tags origin master
|
||||
else
|
||||
echo "okay, never mind then..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user