Make 'bump-version' exit on error
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
321560b029
commit
eb1d371499
|
@ -63,6 +63,8 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bump-version = pkgs.writeShellScriptBin "bump-version" ''
|
bump-version = pkgs.writeShellScriptBin "bump-version" ''
|
||||||
|
set -eu
|
||||||
|
|
||||||
NEW_VERSION="''${1}"
|
NEW_VERSION="''${1}"
|
||||||
|
|
||||||
${pkgs.jq}/bin/jq ".version = \"''${NEW_VERSION}\"" package.json > package.json.tmp
|
${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
|
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" Cargo.toml
|
||||||
|
|
||||||
git add Cargo.toml package.json
|
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}"
|
git tag -a "v''${NEW_VERSION}" -m "Release ''${NEW_VERSION}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue