Skip to content

Commit

Permalink
Makefile: date format of log should not show signatures (sigstore#2835)
Browse files Browse the repository at this point in the history
* Makefile: date format of log should not show signatures

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>

* Makefile: add the ability to DEBUG the `make` build

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>

---------

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
  • Loading branch information
vbatts authored and dmitris committed Mar 27, 2023
1 parent 5181c78 commit dea2173
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ifeq (,$(shell echo $$DEBUG))
else
SHELL = bash -x
endif

GOEXE ?= go
ifeq (,$(shell echo $$DEBUG))
else
SHELL = bash -x
endif

GOEXE ?= go
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell $(GOEXE) env GOBIN))
Expand All @@ -28,7 +39,7 @@ GIT_TAG ?= dirty-tag
GIT_VERSION ?= $(shell git describe --tags --always --dirty)
GIT_HASH ?= $(shell git rev-parse HEAD)
DATE_FMT = +%Y-%m-%dT%H:%M:%SZ
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
SOURCE_DATE_EPOCH ?= $(shell git log -1 --no-show-signature --pretty=%ct)
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
else
Expand Down Expand Up @@ -174,4 +185,4 @@ include test/ci.mk

.PHONY: docgen
docgen:
$(GOEXE) run -tags pivkey,pkcs11key,c$(GOEXE) ./cmd/help/
$(GOEXE) run -tags pivkey,pkcs11key,cgo ./cmd/help/

0 comments on commit dea2173

Please sign in to comment.