diff options
| author | Joe Richey <joerichey94@gmail.com> | 2017-08-29 09:05:02 -0700 |
|---|---|---|
| committer | Joe Richey <joerichey94@gmail.com> | 2017-08-29 09:24:45 -0700 |
| commit | aeb928ca84fb33ac23b7abebd9b402eb362f2fc3 (patch) | |
| tree | 025f1d5bacd3bb70a58165e858481ce9ca5b16b3 /Makefile | |
| parent | c74a5b33c74763643de1d176e600970c672901a6 (diff) | |
Makefile: Build version flag no longer needs repo
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations under # the License. +# Update on each new release!! +RELEASE_VERSION = 0.2.0 + NAME = fscrypt PAM_NAME = pam_$(NAME) PAM_MODULE = $(PAM_NAME).so @@ -76,8 +79,12 @@ export CGO_CFLAGS = $(CFLAGS) # By default, we strip the binary to reduce size. GO_LINK_FLAGS ?= -s -w + # Pass the version to the command line program (pulled from tags). -VERSION_FLAG = -X "main.version=$(shell git describe --tags)" +TAG_VERSION = $(shell git describe --tags) +VERSION = $(if $(TAG_VERSION),$(TAG_VERSION),$(RELEASE_VERSION)) +VERSION_FLAG = -X "main.version=$(VERSION)" + # Pass the current date and time to the command line program. DATE_FLAG = -X "main.buildTime=$(shell date)" # Add the version, date, and any specified LDFLAGS to any user-specified flags. |