Make 'bump-version' exit on error
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bruno BELANYI 2022-06-13 13:43:12 +02:00
parent 321560b029
commit eb1d371499
1 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,8 @@
'';
bump-version = pkgs.writeShellScriptBin "bump-version" ''
set -eu
NEW_VERSION="''${1}"
${pkgs.jq}/bin/jq ".version = \"''${NEW_VERSION}\"" package.json > package.json.tmp
@ -70,7 +72,7 @@
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" Cargo.toml
git add Cargo.toml package.json
git commit -eF <(echo "Release ''${NEW_VERSION}")
echo "Release ''${NEW_VERSION}" | git commit -eF -
git tag -a "v''${NEW_VERSION}" -m "Release ''${NEW_VERSION}"
'';