ci: use tag/branch for release/ci building

This commit is contained in:
André Roth
2024-09-21 21:14:34 +02:00
parent 2d6d371292
commit 7e73165409
2 changed files with 14 additions and 38 deletions

View File

@@ -101,11 +101,15 @@ version: ## Print aptly version
fi
releasetype: # Print release type (ci/release)
@if [ -z "`git tag --points-at HEAD`" ]; then \
echo ci ; \
else \
echo release ; \
fi
@reltype=ci ; \
gitbranch=`git rev-parse --abbrev-ref HEAD` ; \
if [ "$$gitbranch" = "HEAD" ]; then \
gittag=`git describe --tags --exact-match` ;\
if echo "$$gittag" | grep -q '^v[0-9]'; then \
reltype=release ; \
fi ; \
fi ; \
echo $$reltype
build: ## Build aptly
go mod tidy