mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-21 17:40:45 -06:00
build: add one more version check
This commit is contained in:
parent
e32279d494
commit
8cc34dbcde
1 changed files with 4 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -44,8 +44,10 @@ c clean: ## remove the generated files
|
||||||
@rm -f task.mk .task.mk
|
@rm -f task.mk .task.mk
|
||||||
|
|
||||||
define version_check_sh
|
define version_check_sh
|
||||||
if [[ "${VERSION}" == *'-'* ]]; then
|
if git rev-parse -q --verify "refs/tags/${VERSION}" >/dev/null; then
|
||||||
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Uncommited or untagged work)
|
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} tag already exists); exit 1;
|
||||||
|
elif [[ "${VERSION}" == *'-'* ]]; then
|
||||||
|
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Uncommited or untagged work); exit 1;
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ $(shell echo "${VERSION}" | awk -F. '{ print NF }') -lt 3 ]];then\
|
elif [[ $(shell echo "${VERSION}" | awk -F. '{ print NF }') -lt 3 ]];then\
|
||||||
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Expected CalVer string)
|
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Expected CalVer string)
|
||||||
|
|
Loading…
Reference in a new issue