-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
67 lines (50 loc) · 1.17 KB
/
justfile
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
# SPDX-FileCopyrightText: 2024 Shun Sakai
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
alias all := default
alias build-cmd := build-cmd-debug
# Run default recipe
default: test
# Remove generated artifacts
@clean:
go clean
# Run tests
@test:
go test ./...
# Run `golangci-lint run`
@golangci-lint:
golangci-lint run -E gofmt,goimports
# Run the formatter
fmt: gofmt goimports
# Run `go fmt`
@gofmt:
go fmt ./...
# Run `goimports`
@goimports:
fd -e go -x goimports -w
# Run the linter
lint: vet staticcheck
# Run `go vet`
@vet:
go vet ./...
# Run `staticcheck`
@staticcheck:
staticcheck ./...
# Build `glzip` command in debug mode
@build-cmd-debug $CGO_ENABLED="0":
go build ./cmd/glzip
# Build `glzip` command in release mode
@build-cmd-release $CGO_ENABLED="0":
go build -ldflags="-s -w" -trimpath ./cmd/glzip
# Build `glzip(1)`
@build-man:
asciidoctor -b manpage docs/man/man1/glzip.1.adoc
# Run the linter for GitHub Actions workflow files
@lint-github-actions:
actionlint -verbose
# Run the formatter for the README
@fmt-readme:
npx prettier -w README.md
# Increment the version
@bump part:
bump-my-version bump {{part}}