only execute pre-commit hook on master

This commit is contained in:
DavHau 2022-02-04 09:56:51 +07:00
parent 0078acd709
commit 8ea48a742b
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo -n "$(git branch --show-current)" > ./mach_nix/VERSION currBranch="$(git branch --show-current)"
git add ./mach_nix/VERSION if [ $currBranch == "master" ]; then
echo -n "$currBranch" > ./mach_nix/VERSION
git add ./mach_nix/VERSION
fi

View file

@ -1 +1 @@
macos-arm64 master