justfile (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | test:
fish -c "fishtape tests/*.fish"
build:
nix build .
run:
fish --init-command "\
set --prepend fish_complete_path $PWD/completions; \
set --prepend fish_function_path $PWD/functions"
release version:
#!/usr/bin/env fish
if not string match --regex "^[0-9]+\.[0-9]+\.[0-9]+\$" "{{ version }}"
echo >&2 "Invalid version format"
return 1
end
if test -n "$(git status --short)"
echo >&2 "Uncommitted changes"
git status --short
return 1
end
nix run nixpkgs#sd -- 'version = "[^"]+"' 'version = "{{ version }}"' default.nix
git add default.nix
git commit -m "Release version {{ version }}"
git tag -a "v{{ version }}" -m "Release version {{ version }}"
|