bugfix
Some checks failed
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2026-02-11 11:52:34 +11:00
parent a23cc7a183
commit 43a9cf5a7e
11 changed files with 90 additions and 19 deletions

View File

@@ -12,7 +12,14 @@ steps:
- name: go-build
image: cache.coadcorp.com/library/golang
commands:
- go build -v ./...
- XTEVE_VERSION="$(awk '/^#### /{print $2; exit}' changelog-beta.md)"
- XTEVE_VERSION="${XTEVE_VERSION%-beta}"
- SOURCE_VERSION="$(sed -nE 's/^(const|var) Version = \"([^\"]+)\"/\\2/p' xteve.go | head -n1)"
- test -n "${XTEVE_VERSION}" || (echo "Could not parse version from changelog-beta.md" && exit 1)
- test -n "${SOURCE_VERSION}" || (echo "Could not parse source version from xteve.go" && exit 1)
- test "${SOURCE_VERSION}" = "${XTEVE_VERSION}" || (echo "Version mismatch: changelog=${XTEVE_VERSION} source=${SOURCE_VERSION}" && exit 1)
- echo "Building xTeVe version ${XTEVE_VERSION} from changelog-beta.md"
- go build -v -ldflags "-X main.Version=${XTEVE_VERSION}" ./...
- name: dockerfile-lint
image: cache.coadcorp.com/library/hadolint/hadolint:v2.12.0-alpine