ci: use tag/branch for release/ci building

This commit is contained in:
André Roth committed 2024-09-24 10:14:39 +02:00
1 parent 2d6d371292
commit 7e73165409
2 files changed
+14 -38

No files matched your search

+9 -5
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