diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-08-06 23:32:13 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-08-12 12:33:41 +0300 |
commit | 768727f37afa6fbb5082833a4c14c8134ec42122 (patch) | |
tree | 8c7b3d85f9735d8585781a45f9e61b15fdaa3530 /tests/git-pre-commit.testscript | |
parent | 4c61819dedbc3547bf3f352809ecfb6a95ab8753 (diff) |
Add implementation
Diffstat (limited to 'tests/git-pre-commit.testscript')
-rw-r--r-- | tests/git-pre-commit.testscript | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/git-pre-commit.testscript b/tests/git-pre-commit.testscript new file mode 100644 index 0000000..8b8f140 --- /dev/null +++ b/tests/git-pre-commit.testscript @@ -0,0 +1,42 @@ +# file : tests/git-pre-commit.testscript +# license : MIT; see accompanying LICENSE file + +.include git-common.testscript git-pre-commit-common.testscript + +: version-check +: +{ + $clone_prj; + + cat <<EOI >=prj/manifest; + : 1 + name: foo + version: 1.2.3 + summary: Foo + EOI + touch prj/TODO; + $ga .; + $gc; # No committed manifest. + + echo '@@' >=prj/TODO; + + $gc 2>>EOE != 0 # Package with a final version is changed. + error: changing released package foo 1.2.3 without version increment + info: use --no-verify git option to suppress + EOE +} + +: copyright-check +: +{ + $clone_prj; + + cat <<EOI >=prj/LICENSE; + Copyright (c) 2014-2019 the build2 authors. + EOI + $ga .; + + $gc 2>>EOE + WARNING: last copyright year in 'LICENSE' is 2019 + EOE +} |