2 -X "main.versionGit=$(shell git describe --long --tags --dirty --always) \
3 $(shell git show --no-patch --pretty=format:%as)" \
4 -X "main.versionGo=$(shell go version)" \
6 # Build with `make GOFLAGS=` if -race is not supported
14 cd cmd/safcm-remote && ./build.sh
15 go build $(GOFLAGS) -ldflags $(LDFLAGS) ruderich.org/simon/safcm/cmd/safcm
18 @# For proper permissions after initial clone with a strict umask
19 cd cmd/safcm/testdata/project && ../../../../safcm fixperms 2> /dev/null
21 ./cmd/safcm/testdata/ssh/prepare.sh
23 go test $(GOFLAGS) ./...
27 shellcheck cmd/safcm-remote/build.sh
28 shellcheck cmd/safcm/testdata/ssh/prepare.sh
31 rm -rf cmd/safcm/remote/
33 rm -f cmd/safcm/testdata/ssh/ssh/authorized_keys
34 rm -f cmd/safcm/testdata/ssh/ssh/id_ed25519
35 rm -f cmd/safcm/testdata/ssh/ssh/id_ed25519.pub
36 rm -f cmd/safcm/testdata/ssh/ssh/known_hosts
37 rm -f cmd/safcm/testdata/ssh/sshd/ssh_host_key
38 rm -f cmd/safcm/testdata/ssh/sshd/ssh_host_key.pub
39 rm -rf cmd/safcm/testdata/ssh/project/no-changes.example.org/
41 .PHONY: all test clean safcm