diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..750baeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +result +result-* diff --git a/packages/conventional-commit.nix b/packages/conventional-commit.nix index 5f94e1d..14b5336 100644 --- a/packages/conventional-commit.nix +++ b/packages/conventional-commit.nix @@ -16,7 +16,11 @@ writeShellApplication { LOCALE_ARCHIVE = "${lib.getLib glibcLocales}/lib/locale/locale-archive"; }; text = '' - exec grep -P '^(build|chore|ci|docs|feat|fix|perf|p?refactor|revert|style|test)(\([\w/-]+\))?!?: ' + reg='^(build|chore|ci|docs|feat|fix|perf|p?refactor|revert|style|test)(\([\w/-]+\))?!?: ' + if ! grep -P "$reg"; then + printf "Message must match conventional commit pattern:\n\n%s\n" "$reg" + exit 1 + fi ''; derivationArgs.postCheck = '' (