Skip to content

Commit

Permalink
Use PGPING_VERSION env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aswinkarthik committed Feb 26, 2019
1 parent 6a699fc commit b4b5f42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-include .env

VERSION := $(shell git describe --tags)
ifndef PGPING_VERSION
PGPING_VERSION := $(shell git describe --tags)-dirty
endif

compile:
go build -o pg-ping -ldflags "-s -w -X main.version=$(VERSION)" main.go
go build -o pg-ping -ldflags "-s -w -X main.version=$(PGPING_VERSION)" main.go

0 comments on commit b4b5f42

Please sign in to comment.