1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Feature: Adds support for --version

Resolves: #24
This commit is contained in:
kenjones
2017-09-23 00:45:31 -04:00
parent 6980be3800
commit 72bd88cfa5
7 changed files with 137 additions and 3 deletions

View File

@@ -5,8 +5,8 @@ export GIT_COMMIT = $(shell git rev-parse --short HEAD)
export GIT_DIRTY = $(shell test -n "$$(git status --porcelain)" && echo "+CHANGES" || true)
export GIT_DESCRIBE = $(shell git describe --tags --always)
LDFLAGS :=
# LDFLAGS += -X ${IMPORT_PATH}/${PROJECT}.Commit=${GIT_COMMIT}
# LDFLAGS += -X ${IMPORT_PATH}/${PROJECT}.Version=${GIT_DESCRIBE}
LDFLAGS += -X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY}
LDFLAGS += -X main.GitDescribe=${GIT_DESCRIBE}
# Windows environment?
CYG_CHECK := $(shell hash cygpath 2>/dev/null && echo 1)
@@ -28,6 +28,7 @@ endif
DEV_IMAGE := ${PROJECT}_dev
DOCKRUN := docker run --rm \
-e LDFLAGS="${LDFLAGS}" \
-v ${ROOT}/vendor:/go/src \
-v ${ROOT}:/${PROJECT}/src/${IMPORT_PATH} \
-w /${PROJECT}/src/${IMPORT_PATH} \