diff options
author | Ben Sima <ben@bsima.me> | 2022-07-18 22:09:58 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-07-19 09:22:58 -0400 |
commit | bc9e5b0ea863a17537987faa5a72b00efc7767d1 (patch) | |
tree | a22df5a00c29f5612a5f6885b9e6bb9a7a56d420 /Biz/Ide | |
parent | f034ad709ba0de5a2e5ec6be47523f595e381d7a (diff) |
Upgrade nixpkgs, ghc923
I ended up deleting miso, and consequently all files under Hero/ and Miso/,
because I couldn't get miso to build with GHC 9.2.
Other things:
- Niv has been wrapped by Biz/Bild/Deps.hs, so I can extend it to my liking.
- Apply-refact is gone because I couldn't get it to build.
- Disabled python stuff.
Diffstat (limited to 'Biz/Ide')
-rwxr-xr-x | Biz/Ide/hooks/pre-commit | 4 | ||||
-rwxr-xr-x | Biz/Ide/version | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/Biz/Ide/hooks/pre-commit b/Biz/Ide/hooks/pre-commit index 507d7e6..31a4e68 100755 --- a/Biz/Ide/hooks/pre-commit +++ b/Biz/Ide/hooks/pre-commit @@ -8,7 +8,9 @@ for ns in ${changed[@]} do version=$($BIZ_ROOT/Biz/Ide/version $ns) - if (( $version < 1 )); then + if (( $version == -1 )); then + echo "info: version: $ns: deleted" + elif (( $version < 1 )); then echo "fail: version: $ns: $version" exit 1 else diff --git a/Biz/Ide/version b/Biz/Ide/version index 3a02b95..5b017d9 100755 --- a/Biz/Ide/version +++ b/Biz/Ide/version @@ -3,9 +3,13 @@ # simple implementation of kelvin versioning ## ns=$1 - commits=$(git log --oneline --follow $ns | wc -l) - # gold melts at 1337 kelvin, so we start with this - # bc we are forging gold here - version=$(bc -l <<< "1337 - $commits") - echo $version + if [[ -e "$1" ]]; then + commits=$(git log --oneline --follow $ns | wc -l) + # gold melts at 1337 kelvin, so we start with this + # bc we are forging gold here + version=$(bc -l <<< "1337 - $commits") + echo $version + else + echo -1 # signal that file doesn't exist + fi ## |