-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
70 lines (53 loc) · 1.62 KB
/
Copy pathjustfile
File metadata and controls
70 lines (53 loc) · 1.62 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
alias b := build
alias bf := build-full
alias bfu := build-full-upgrade
alias bc := build-clean
alias c := clean
alias l := lint
alias rpccs := run-panther-cloud-connected-setup
alias t := test
alias tv := test-verbose
alias tc := test-coverage
alias u := deps-upgrade
build: copy-config
CGO_ENABLED=0 go build -o ./bin/panther-cloud-connected-setup/panther-cloud-connected-setup ./cmd/panther-cloud-connected-setup/
copy-config:
#!/usr/bin/env sh
mkdir -p ./bin/panther-cloud-connected-setup/
if [ -f "config.yml" ]; then
echo "Found config.yml file, copying to ./bin/panther-cloud-connected-setup/"
cp -f config.yml ./bin/panther-cloud-connected-setup/
fi
build-full: deps lint fmt build
build-full-upgrade: deps-upgrade lint fmt build
deps:
go get ./...
deps-upgrade:
go get -u ./...
go mod tidy
lint:
golangci-lint run --fix
fmt:
golangci-lint fmt
clean:
rm -rf ./bin/
rm -rf ./dist/
build-clean: clean build-full-upgrade
run-panther-cloud-connected-setup: build
./bin/panther-cloud-connected-setup/panther-cloud-connected-setup --config-file config.yml --verbose
install-goreleaser:
go install github.com/goreleaser/goreleaser/v2@latest
build-release: install-goreleaser
goreleaser build --snapshot --clean
# Run all tests
test:
go test ./pkg/...
# Run all tests with verbose output
test-verbose:
CGO_ENABLED=0 go test -v ./pkg/...
# Run tests with coverage report
test-coverage:
CGO_ENABLED=0 go test -cover ./pkg/...
# Run tests for a specific package (usage: just test-pkg pkg/state)
test-pkg pkg:
CGO_ENABLED=0 go test -v ./{{pkg}}/...