Skip to content

Commit

Permalink
Put it back
Browse files Browse the repository at this point in the history
  • Loading branch information
lildude committed Oct 12, 2023
1 parent ef01a22 commit c95401a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
-include .env

SHA=`git show --quiet --format=format:%H`

build:
CGO_ENABLED=0 go build -o app cmd/main.go

build_azure:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app cmd/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X github.com/lildude/starling-sweep/internal/ping.Version=$(SHA)" -o app cmd/main.go

lint:
golangci-lint run
Expand Down
4 changes: 1 addition & 3 deletions internal/ping/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ package ping
import (
"fmt"
"net/http"

"github.com/carlmjohnson/versioninfo"
)

var Version = versioninfo.Revision
var Version = "dev"

func Handler(w http.ResponseWriter, r *http.Request) {
// Set version in response header
Expand Down

0 comments on commit c95401a

Please sign in to comment.