Skip to content

Commit

Permalink
releaseVersion tag attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed May 29, 2021
1 parent c76ccfe commit d96dfbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-release
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ RUN apk add --no-cache libcap-static libpcap-dev linux-headers git go file --rep

RUN git clone https://github.com/mosajjal/dnsmonster.git /opt/dnsmonster --depth 1 \
&& cd /opt/dnsmonster/src \
&& export RELEASE_VERSION=`git describe --tags` \
&& go build --ldflags "-L /usr/lib/libcap.a -linkmode external -X main.RELEASE_VERSION=$RELEASE_VERSION -extldflags \"-static\"" -o /tmp/dnsmonster-linux-amd64.bin
&& export LATEST_TAG=`git describe --tags` \
&& go build --ldflags "-L /usr/lib/libcap.a -linkmode external -X main.releaseVersion=$LATEST_TAG -extldflags \"-static\"" -o /tmp/dnsmonster-linux-amd64.bin


ENV CGO_ENABLED=1
Expand Down
4 changes: 2 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/namsral/flag"
)

const RELEASE_VERSION = "DEVELOPMENT"
var releaseVersion string = "DEVELOPMENT"

type splunkOutputEndpointList []string

Expand Down Expand Up @@ -121,7 +121,7 @@ func checkFlags() {
errorHandler(err)

if *version {
log.Fatalln("dnsmonster version:", RELEASE_VERSION)
log.Fatalln("dnsmonster version:", releaseVersion)
}

//TODO: log format needs to be a configurable parameter
Expand Down

0 comments on commit d96dfbe

Please sign in to comment.