X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=Makefile;h=b21ed3d0893740fd8fe2f590065f1f60738e43a2;hp=c7569895201a26f030f971b8c42ca06e0816e108;hb=2804606f9f8dc5078c38580bac363b47eb638620;hpb=444e9874424580361e00547b597d213370045057 diff --git a/Makefile b/Makefile index c756989..b21ed3d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ LDFLAGS = '\ - -X "main.versionGit=$(shell git describe --long --tags --dirty --always)" \ + -X "main.versionGit=$(shell git describe --long --tags --dirty --always) \ +$(shell git show --no-patch --pretty=format:%as)" \ -X "main.versionGo=$(shell go version)" \ ' # Build with `make GOFLAGS=` if -race is not supported @@ -12,15 +13,29 @@ safcm: go fmt ./... cd cmd/safcm-remote && ./build.sh go build $(GOFLAGS) -ldflags $(LDFLAGS) ruderich.org/simon/safcm/cmd/safcm - @# For proper permissions after initial clone with a strict umask - cd cmd/safcm/testdata/project && ../../../../safcm fixperms 2> /dev/null test: + @# For proper permissions after initial clone with a strict umask + cd cmd/safcm/testdata/project && ../../../../safcm fixperms 2> /dev/null + @# + ./cmd/safcm/testdata/ssh/prepare.sh go vet ./... - go test $(GOFLAGS) $(TESTFLAGS) ./... + go test $(GOFLAGS) ./... + +lint: + shellcheck ci/run + shellcheck cmd/safcm-remote/build.sh + shellcheck cmd/safcm/testdata/ssh/prepare.sh clean: - rm -rf remote/helpers/ + rm -rf cmd/safcm/remote/ rm -f safcm + rm -f cmd/safcm/testdata/ssh/ssh/authorized_keys + rm -f cmd/safcm/testdata/ssh/ssh/id_ed25519 + rm -f cmd/safcm/testdata/ssh/ssh/id_ed25519.pub + rm -f cmd/safcm/testdata/ssh/ssh/known_hosts + rm -f cmd/safcm/testdata/ssh/sshd/ssh_host_key + rm -f cmd/safcm/testdata/ssh/sshd/ssh_host_key.pub + rm -rf cmd/safcm/testdata/ssh/project/no-changes.example.org/ .PHONY: all test clean safcm