-
Notifications
You must be signed in to change notification settings - Fork 9
/
justfile
27 lines (20 loc) · 927 Bytes
/
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
commonenv := "CGO_ENABLED=0"
version := `./tools/image-tag`
commit := `git rev-parse --short HEAD`
pluginPaths := `find ./pkg/plugins -type f -iname "go.mod" -print0 | xargs -0 dirname | xargs -I{} basename {} | tr ' ' ',' | tr '\n' ','`
default:
just --list
# Run unit tests
test-all-plugins:
{{commonenv}} find ./pkg/plugins -type f -iname "go.mod" -print0 | xargs -0 -I{} ./tools/run-tests {}
build-all-plugins: clean test-all-plugins
mkdir -p ./build
find ./pkg/plugins -type f -iname "go.mod" -print0 | {{commonenv}} VERSION={{version}} COMMIT={{commit}} xargs -0 -I{} ./tools/build-plugins {}
init-workspace:
go work init
find . -type f -iname "go.mod" -print0 | xargs -0 dirname | xargs -I{} go work use {}
integration-test-all-plugins:
echo "pluginPaths: {{pluginPaths}}"
{{commonenv}} go run pkg/test/pkg/executor/main/main.go --plugins={{pluginPaths}}
clean:
rm -rf ./build