From d7960c904e725492e1db476271461bd8669e7200 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Wed, 2 Oct 2024 15:13:46 +0200 Subject: [PATCH 1/2] Let go build handle rebuilding It's better to let go build itself decide when to rebuild and not. For example it also takes changes to go.mod into account. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08fb6c3..abfca42 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,13 @@ BINDIR := $(PREFIX)/bin LIBDIR := $(PREFIX)/lib SHRDIR := $(PREFIX)/share BINS = $(notdir $(wildcard cmd/*)) -SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") TAG = $(shell git describe --abbrev=0 --tags) all: build build: $(BINS) -$(addprefix bin/,$(BINS)): $(SRC) +.PHONY: $(addprefix bin/,$(BINS)) +$(addprefix bin/,$(BINS)): go build -buildmode=pie -trimpath -o $@ ./cmd/$(@F) # TODO: Needs to be better written From 68adcf8c911924c0b959f7c4be2b869ef21212b9 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Wed, 2 Oct 2024 15:15:37 +0200 Subject: [PATCH 2/2] Run go mod tidy --- go.sum | 4 ---- 1 file changed, 4 deletions(-) diff --git a/go.sum b/go.sum index 04db372..a6e7acf 100644 --- a/go.sum +++ b/go.sum @@ -3,12 +3,8 @@ github.com/coreos/go-oidc/v3 v3.11.0/go.mod h1:gE3LgjOgFoHi9a4ce4/tJczr0Ai2/BoDh github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/foxboron/go-tpm-keyfiles v0.0.0-20240725205618-b7c5a84edf9d h1:odwhCo3olsbN0fkXxCSH3aYz2OhrkcH93oU2QKEcI9s= -github.com/foxboron/go-tpm-keyfiles v0.0.0-20240725205618-b7c5a84edf9d/go.mod h1:uAyTlAUxchYuiFjTHmuIEJ4nGSm7iOPaGcAyA81fJ80= github.com/foxboron/go-tpm-keyfiles v0.0.0-20240805214234-f870d6f1ff68 h1:u1Lbb2hWuU302IAaCccDkzPWLgpMBfvva/EMDutEUXk= github.com/foxboron/go-tpm-keyfiles v0.0.0-20240805214234-f870d6f1ff68/go.mod h1:uAyTlAUxchYuiFjTHmuIEJ4nGSm7iOPaGcAyA81fJ80= -github.com/foxboron/ssh-tpm-ca-authority v0.0.0-20240803200907-c91839acffbd h1:mVBXLv2BBWDQl36FBX+EZjr7KjlOBqi+lb5O2TU+qwI= -github.com/foxboron/ssh-tpm-ca-authority v0.0.0-20240803200907-c91839acffbd/go.mod h1:aJ0EczGmWlB5PFj4/h5+5LGVU/sUEzmqvr+P1Z6a4lo= github.com/foxboron/ssh-tpm-ca-authority v0.0.0-20240806093457-88eeced81948 h1:Snzez6U0L1Jl9TtL5zSFAtV/ahRAM+3A+k1fNMTmSxw= github.com/foxboron/ssh-tpm-ca-authority v0.0.0-20240806093457-88eeced81948/go.mod h1:7BQDgpVVyISJ9W4O52KCbdBgQuujnZG2Ytuep1ya5NE= github.com/foxboron/swtpm_test v0.0.0-20230726224112-46aaafdf7006 h1:50sW4r0PcvlpG4PV8tYh2RVCapszJgaOLRCS2subvV4=