Add a nix package
This commit is contained in:
parent
e77a4ee485
commit
4fe66154c3
2 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,11 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
packages.default = pkgs.writeShellApplication {
|
||||||
|
name = "git-check-assertions";
|
||||||
|
runtimeInputs = [ pkgs.git ];
|
||||||
|
text = builtins.readFile ./git-check-assertions.sh;
|
||||||
|
};
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [ bats ];
|
packages = with pkgs; [ bats ];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ for commit_hash in "${commits[@]}"; do
|
||||||
echo "Checking out $commit_hash"
|
echo "Checking out $commit_hash"
|
||||||
git -c advice.detachedHead=false checkout -q "$commit_hash"
|
git -c advice.detachedHead=false checkout -q "$commit_hash"
|
||||||
commit_msg="$(git log -1 --format=%B "$commit_hash")"
|
commit_msg="$(git log -1 --format=%B "$commit_hash")"
|
||||||
|
# shellcheck disable=SC2016
|
||||||
block="$(printf '%s\n' "$commit_msg" \
|
block="$(printf '%s\n' "$commit_msg" \
|
||||||
| sed -n '/^```git-check-assertions[[:space:]]*$/,/^```[[:space:]]*$/p' \
|
| sed -n '/^```git-check-assertions[[:space:]]*$/,/^```[[:space:]]*$/p' \
|
||||||
| sed '1d;$d')"
|
| sed '1d;$d')"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue