Merge pull request 'Package with nix' (#1) from package into main
Reviewed-on: https://codeberg.org/svenvanheugten/git-check-assertions/pulls/1
This commit is contained in:
commit
8ac30906df
3 changed files with 9 additions and 1 deletions
|
|
@ -7,7 +7,9 @@ end_of_line = lf
|
|||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.sh]
|
||||
indent_size = 2
|
||||
|
||||
[*.nix]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.writeShellApplication {
|
||||
name = "git-check-assertions";
|
||||
runtimeInputs = [ pkgs.git ];
|
||||
text = builtins.readFile ./git-check-assertions.sh;
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [ bats ];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ for commit_hash in "${commits[@]}"; do
|
|||
echo "Checking out $commit_hash"
|
||||
git -c advice.detachedHead=false checkout -q "$commit_hash"
|
||||
commit_msg="$(git log -1 --format=%B "$commit_hash")"
|
||||
# shellcheck disable=SC2016
|
||||
block="$(printf '%s\n' "$commit_msg" \
|
||||
| sed -n '/^```git-check-assertions[[:space:]]*$/,/^```[[:space:]]*$/p' \
|
||||
| sed '1d;$d')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue