Add 'bump-version' script
This commit is contained in:
parent
3e46a9b762
commit
7bacff2471
15
flake.nix
15
flake.nix
|
@ -46,6 +46,20 @@
|
||||||
overlays = [ self.overlays.default ];
|
overlays = [ self.overlays.default ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bump-version = pkgs.writeShellScriptBin "bump-version" ''
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
NEW_VERSION="''${1}"
|
||||||
|
|
||||||
|
${pkgs.jq}/bin/jq ".version = \"''${NEW_VERSION}\"" package.json > package.json.tmp
|
||||||
|
mv package.json.tmp package.json
|
||||||
|
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" Cargo.toml
|
||||||
|
|
||||||
|
git add Cargo.toml package.json
|
||||||
|
echo "Release ''${NEW_VERSION}" | git commit -eF -
|
||||||
|
git tag -a "v''${NEW_VERSION}" -m "Release ''${NEW_VERSION}"
|
||||||
|
'';
|
||||||
|
|
||||||
tree-sitter-env = pkgs.stdenv.mkDerivation {
|
tree-sitter-env = pkgs.stdenv.mkDerivation {
|
||||||
name = "tree-sitter-env";
|
name = "tree-sitter-env";
|
||||||
|
|
||||||
|
@ -96,6 +110,7 @@
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
bump-version
|
||||||
nodejs
|
nodejs
|
||||||
# FIXME: waiting on #301336
|
# FIXME: waiting on #301336
|
||||||
# (tree-sitter.override { webUISupport = true; })
|
# (tree-sitter.override { webUISupport = true; })
|
||||||
|
|
Loading…
Reference in a new issue