diff --git a/.VERSION b/.VERSION new file mode 100644 index 00000000..998eb1f6 --- /dev/null +++ b/.VERSION @@ -0,0 +1 @@ +$Format:%d$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..8a72c253 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.VERSION export-subst diff --git a/.version.sh b/.version.sh new file mode 100755 index 00000000..14adccbf --- /dev/null +++ b/.version.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +read -r firstline < .VERSION +last_half="${firstline##*tag: }" +if [[ ${last_half::1} == "v" ]]; then + version_string="${last_half%%[,)]*}" +fi +echo "${version_string:-v0.0.0}" diff --git a/Gopkg.lock b/Gopkg.lock index 4e9e39c3..a11d0292 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -277,7 +277,7 @@ [[projects]] branch = "master" - digest = "1:17d4424defbc718315d61e296841867ff76b3e03a941b41fdddbae11a7d47746" + digest = "1:a11fa27b1cebc2aa3650bd2086aeadf1e2aaf1f4b646895893b80260b17a19d2" name = "github.com/smallstep/cli" packages = [ "command", @@ -298,7 +298,7 @@ "utils", ] pruneopts = "UT" - revision = "fe87ac01926afb1a518a98d4768fded646bddce1" + revision = "68ac9850f47f4cfe0045f1444f3f23404e2237ba" [[projects]] branch = "master" diff --git a/Makefile b/Makefile index 093ecf62..08613bd6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ OUTPUT_ROOT=output/ # Set shell to bash for `echo -e` SHELL := /bin/bash -all: build lint test +all: build test lint .PHONY: all @@ -49,6 +49,9 @@ $(foreach pkg,$(BOOTSTRAP),$(eval $(call VENDOR_BIN_TMPL,$(pkg)))) # Version flags to embed in the binaries VERSION ?= $(shell [ -d .git ] && git describe --tags --always --dirty="-dev") +# If we are not in an active git dir then try reading the version from .VERSION. +# .VERSION contains a slug populated by `git archive`. +VERSION := $(or $(VERSION),$(shell ./.version.sh .VERSION)) VERSION := $(shell echo $(VERSION) | sed 's/^v//') # If TRAVIS_TAG is set then we know this ref has been tagged. @@ -99,7 +102,7 @@ test: vtest: $(Q)for d in $$(go list ./... | grep -v vendor); do \ echo -e "TESTS FOR: for \033[0;35m$$d\033[0m"; \ - $(GOFLAGS) go test -v -bench=. -run=. -short -coverprofile=coverage.out $$d; \ + $(GOFLAGS) go test -v -bench=. -run=. -short -coverprofile=vcoverage.out $$d; \ out=$$?; \ if [[ $$out -ne 0 ]]; then ret=$$out; fi;\ rm -f profile.coverage.out; \ @@ -153,6 +156,19 @@ uninstall: .PHONY: install uninstall +######################################### +# Clean +######################################### + +clean: + @echo "You will need to run 'make bootstrap' or 'dep ensure' directly to re-download any dependencies." + $Q rm -rf vendor +ifneq ($(BINNAME),"") + $Q rm -f bin/$(BINNAME) +endif + +.PHONY: clean + ######################################### # Building Docker Image # @@ -301,16 +317,3 @@ artifacts-release: artifacts-tag artifacts: artifacts-$(PUSHTYPE) docker-$(PUSHTYPE) .PHONY: artifacts-master artifacts-release artifacts - -######################################### -# Clean -######################################### - -clean: - @echo "You will need to run 'make bootstrap' or 'dep ensure' directly to re-download any dependencies." - $Q rm -rf vendor -ifneq ($(BINNAME),"") - $Q rm -f bin/$(BINNAME) -endif - -.PHONY: clean diff --git a/debian/changelog b/debian/changelog index 1543d10b..48efaee7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -step-certificates (0.0.1-rc.2) unstable; urgency=medium +step-certificates (0.8.4-14-ge72f087-dev) unstable; urgency=medium * See https://github.com/smallstep/certificates/releases - -- Smallstep Labs, Inc. Thu, 01 Nov 2018 00:00:00 +0000 + -- Smallstep Labs, Inc. Wed, 20 Feb 2019 20:44:25 +0000