Skip to content

Commit

Permalink
BUG/MINOR: build: if tag does not exist use dev as tag
Browse files Browse the repository at this point in the history
  • Loading branch information
oktalz committed Feb 7, 2024
1 parent 3e0133c commit cd5087d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY / /src

RUN mkdir -p /var/run/vars && \
cd /src && \
git describe --abbrev=0 --tags > /var/run/vars/GIT_LAST_TAG && \
git describe --abbrev=0 --tags > /var/run/vars/GIT_LAST_TAG || echo "dev" > /var/run/vars/GIT_LAST_TAG && \
CGO_ENABLED=0 go build \
-ldflags "-X github.com/haproxytech/kubernetes-ingress/pkg/version.GitTag=$(cat /var/run/vars/GIT_LAST_TAG)" \
-o fs/haproxy-ingress-controller .
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.pebble
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN go install github.com/canonical/pebble/cmd/[email protected]

RUN mkdir -p /var/run/vars && \
cd /src && \
git describe --abbrev=0 --tags > /var/run/vars/GIT_LAST_TAG && \
git describe --abbrev=0 --tags > /var/run/vars/GIT_LAST_TAG || echo "dev" > /var/run/vars/GIT_LAST_TAG && \
CGO_ENABLED=0 go build \
-ldflags "-X github.com/haproxytech/kubernetes-ingress/pkg/version.GitTag=$(cat /var/run/vars/GIT_LAST_TAG)" \
-o fs/haproxy-ingress-controller .
Expand Down

0 comments on commit cd5087d

Please sign in to comment.