-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
44 lines (34 loc) · 904 Bytes
/
Copy pathjustfile
File metadata and controls
44 lines (34 loc) · 904 Bytes
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
default: build
build:
# -tags timetzdata embeds IANA zones (Asia/Shanghai etc.) for Windows/Alpine.
go build -tags timetzdata -o crypto ./cmd/crypto-ticker
run: build
./crypto
install: build
sudo install -m 755 crypto /usr/local/bin/crypto
lint:
go vet ./...
test:
go test ./...
tidy:
go mod tidy
check: tidy lint test
release-dry:
goreleaser release --snapshot --clean
release tag:
git tag {{tag}}
git push origin {{tag}}
clean:
#!/usr/bin/env bash
set -euo pipefail
args=(-fdx)
if [[ -f .cleanexclude ]]; then
while IFS= read -r line || [[ -n "$line" ]]; do
line="${line%%#*}"
line="${line#"${line%%[![:space:]]*}"}"
line="${line%"${line##*[![:space:]]}"}"
[[ -z "$line" ]] && continue
args+=(-e "$line")
done < .cleanexclude
fi
git clean "${args[@]}"