-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
45 lines (32 loc) · 1.16 KB
/
Justfile
File metadata and controls
45 lines (32 loc) · 1.16 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
bin := "cofidectl"
pkg := "./cmd/cofidectl/main.go"
# Internal build target without defaults
_build *args:
CGO_ENABLED=0 go build {{args}} {{pkg}}
build-test-plugin:
CGO_ENABLED=0 go build -o cofidectl-test-plugin ./cmd/cofidectl-test-plugin/main.go
# Build without testing
build-only *args:
just _build -o {{bin}} {{args}}
# Test and build
build *args: test
just build-only {{args}}
# Release build with version injection
build-release-version version output=bin:
just _build '-ldflags="-s -w -X main.version={{version}}"' -o {{output}}
install-test-plugin: build-test-plugin
mkdir -p ~/.cofide/plugins
cp cofidectl-test-plugin ~/.cofide/plugins
test *args:
CGO_ENABLED=0 go run gotest.tools/gotestsum@latest --format github-actions ./... {{args}}
test-race: (test "--" "-race")
lint *args:
golangci-lint run {{args}}
install-kind:
tests/integration/install-kind.sh
create-kind-cluster:
tests/integration/create-kind-cluster.sh
create-kind-clusters num_clusters:
tests/integration/create-kind-clusters.sh {{num_clusters}}
integration-test test:
tests/integration/{{test}}/test.sh