cleanup version numbers
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
docker-data
|
||||
|
||||
README-DEV.md
|
||||
changelog-beta.md
|
||||
|
||||
*.log
|
||||
*.tmp
|
||||
|
||||
@@ -13,10 +13,7 @@ steps:
|
||||
image: cache.coadcorp.com/library/golang
|
||||
commands:
|
||||
- XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed 's/-beta$//')"
|
||||
- SOURCE_VERSION="$(grep -m1 '^var Version = ' xteve.go | cut -d' ' -f4 | tr -d '"')"
|
||||
- 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" ./...
|
||||
|
||||
|
||||
@@ -12,11 +12,10 @@ COPY . .
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN XTEVE_VERSION="$(awk '/^#### /{print $2; exit}' changelog-beta.md)" \
|
||||
&& XTEVE_VERSION="${XTEVE_VERSION%-beta}" \
|
||||
&& test -n "${XTEVE_VERSION}" \
|
||||
RUN XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed 's/-beta$//')" \
|
||||
&& test -n "$XTEVE_VERSION" \
|
||||
&& CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -trimpath -ldflags="-s -w -X main.Version=${XTEVE_VERSION}" -o /out/xteve ./xteve.go
|
||||
go build -trimpath -ldflags="-s -w -X main.Version=$XTEVE_VERSION" -o /out/xteve ./xteve.go
|
||||
|
||||
FROM alpine:3.23
|
||||
|
||||
|
||||
Reference in New Issue
Block a user