-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (33 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.PHONY: age-plugin-tkey
age-plugin-tkey: check-deviceapp-hashes
go build ./cmd/age-plugin-tkey
# TODO: probably something like this for release builds of tagged version:
# go build -trimpath -buildvcs=false -ldflags="-X=main.version=$version"
# and CGO_ENABLED=0?
.PHONY: install
install:
cp -af age-plugin-tkey /usr/local/bin/
.PHONY: check-deviceapp-hashes
check-deviceapp-hashes:
(cd internal/tkey && sha512sum -c -w --ignore-missing x25519-hashes.sha512)
.PHONY: clean
clean:
rm -f age-plugin-tkey
.PHONY: build-in-container
build-in-container:
podman image exists tkey-apps-builder || make build-image
./build-in-container.sh tkey-apps-builder
.PHONY: build-image
build-image:
#--pull=always --no-cache
podman build -t localhost/tkey-apps-builder -f Containerfile
golangci_version=$(shell grep -A2 "uses: golangci" .github/workflows/ci.yaml | grep -o -m1 "v[0-9]\+\.[.0-9]\+")
golangci_cachedir=$(HOME)/.cache/golangci-lint/$(golangci_version)
.PHONY: lint
lint:
mkdir -p $(golangci_cachedir)
podman run --rm -it \
-v $$(pwd):/src -w /src \
-v $(golangci_cachedir):/root/.cache \
docker.io/golangci/golangci-lint:$(golangci_version)-alpine \
golangci-lint run