-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
79 lines (61 loc) · 2.21 KB
/
Copy pathjustfile
File metadata and controls
79 lines (61 loc) · 2.21 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
set shell := ["bash", "-euo", "pipefail", "-c"]
set dotenv-load := true
set dotenv-override := true
generate:
go generate ./...
build: generate
go build -o killswitch ./cmd/killswitch
go build -o killswitch-user ./cmd/killswitch-user
go build -o killswitch-cli ./cmd/killswitch-cli
daemon: build
sudo ./killswitch ./killswitch.example.json
user: build
./killswitch-user ./killswitch-user.example.json
get-cfg: build
./killswitch-cli get-cfg --watch
notifications: build
./killswitch-cli notifications
debug-notify level="error" text="debug notification" header="Debug": build
./killswitch-cli debug-notify -level '{{level}}' -header '{{header}}' -text '{{text}}'
disable: build
./killswitch-cli set -target ruleset.disabled -ruleset wireguard-up true
cli-add: build
./killswitch-cli add -target base_policy.allowed_ports tcp/443
cli-help: build
./killswitch-cli --help
tmp-ruleset: build
./killswitch-cli tmp-ruleset -interfaces wg0 -json '{"enable_v4":true,"allowed_v4_hostports":["udp/198.51.100.10:51820"]}'
allow-all: build
./killswitch-cli set -target base_policy.allow_all true
force-ruleset: build
./killswitch-cli force-ruleset -interfaces enp86s0u1u1 -ruleset wireguard-up
test:
go test ./... -count=1
release-check-env:
@missing=0; \
for name in GITHUB_TOKEN GPG_FINGERPRINT PACKAGE_MAINTAINER AUR_KEY MYREPO; do \
if [ -z "${!name:-}" ]; then \
echo "missing required environment variable: ${name}" >&2; \
missing=1; \
fi; \
done; \
if [ "${missing}" -ne 0 ]; then \
exit 1; \
fi; \
if [ ! -r "${AUR_KEY}" ]; then \
echo "AUR_KEY does not point to a readable private key: ${AUR_KEY}" >&2; \
exit 1; \
fi; \
case "$(head -n1 "${AUR_KEY}")" in \
ssh-*|ecdsa-*|sk-*) \
echo "AUR_KEY points to a public key, but GoReleaser needs the private key: ${AUR_KEY}" >&2; \
exit 1; \
;; \
esac
release-check: release-check-env
goreleaser check
release-snapshot: release-check-env
SSH_BIN="${SSH_BIN:-$(command -v ssh)}" goreleaser release --clean --snapshot --skip=publish --skip=validate
release: release-check-env
SSH_BIN="${SSH_BIN:-$(command -v ssh)}" goreleaser release --clean --skip=validate
"$MYREPO/maintain" save feat "add pmark $(git describe --tags --abbrev=0)"