Skip to content

Commit 18a300d

Browse files
committed
fix: master build version
1 parent 9f54b1e commit 18a300d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ build-docker-multiarch-master:
111111
docker buildx build --sbom=true --provenance=true \
112112
$(if $(DOCKER_BUILD_PUSH),--push) \
113113
--label org.opencontainers.image.revision=$(shell git rev-parse HEAD) \
114-
--label org.opencontainers.image.version=$(shell git describe --tags) \
114+
--label org.opencontainers.image.version=master-$(shell git rev-parse --short HEAD) \
115115
--label org.opencontainers.image.created=$(shell date -u +%Y-%m-%dT%H:%M:%SZ) \
116116
-t gotify/server:master \
117117
-t ghcr.io/gotify/server:master \
118118
--build-arg RUN_TESTS=$(DOCKER_TEST_LEVEL) \
119119
--build-arg GO_VERSION=$(GO_VERSION) \
120-
--build-arg LD_FLAGS="-w -s -X main.Version=$(shell git describe --tags) -X main.BuildDate=$(shell date "+%F-%T") -X main.Commit=$(shell git rev-parse --verify HEAD) -X main.Mode=prod" \
120+
--build-arg LD_FLAGS="-w -s -X main.Version=master-$(shell git rev-parse --short HEAD) -X main.BuildDate=$(shell date "+%F-%T") -X main.Commit=$(shell git rev-parse --verify HEAD) -X main.Mode=prod" \
121121
--platform linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/riscv64 \
122122
-f docker/Dockerfile .
123123

ui/src/layout/Header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ const Header = ({
112112
</Typography>
113113
</Link>
114114
<a
115-
href={'https://github.com/gotify/server/releases/tag/v' + version}
115+
href={
116+
version.startsWith('master-')
117+
? `https://github.com/gotify/server/commit/${version.replace('master-', '')}`
118+
: `https://github.com/gotify/server/releases/tag/v${version}`
119+
}
116120
className={classes.link}>
117121
<Typography variant="button" color="inherit">
118122
@{version}

0 commit comments

Comments
 (0)