forked from jetify-com/devbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devbox.json
44 lines (44 loc) · 2.01 KB
/
devbox.json
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
{
"name": "devbox",
"description": "Instant, easy, and predictable development environments",
"packages": {
"go": "latest",
"runx:golangci/golangci-lint": "latest",
"runx:mvdan/gofumpt": "latest",
},
"env": {
"GOENV": "off",
"PATH": "$PATH:$PWD/dist",
},
"shell": {
"init_hook": [
// Remove Go environment variables that might've been inherited from the
// user's environment and could affect the build.
"test -z $FISH_VERSION && \\",
"unset CGO_ENABLED GO111MODULE GOARCH GOFLAGS GOMOD GOOS GOROOT GOTOOLCHAIN GOWORK || \\",
"set --erase CGO_ENABLED GO111MODULE GOARCH GOFLAGS GOMOD GOOS GOROOT GOTOOLCHAIN GOWORK",
],
"scripts": {
// Build devbox for the current platform
"build": "go build -o dist/devbox ./cmd/devbox",
"build-darwin-amd64": "GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox",
"build-darwin-arm64": "GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox",
"build-linux-amd64": "GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox",
"build-linux-arm64": "GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox",
"build-all": [
"devbox run build-darwin-amd64",
"devbox run build-darwin-arm64",
"devbox run build-linux-amd64",
"devbox run build-linux-arm64",
],
// Open VSCode
"code": "code .",
"lint": "golangci-lint run --timeout 5m && scripts/gofumpt.sh",
"fmt": "scripts/gofumpt.sh",
"test": "go test -race -cover ./...",
"test-projects-only": "DEVBOX_RUN_PROJECT_TESTS=1 go test -v -timeout ${DEVBOX_GOLANG_TEST_TIMEOUT:-30m} ./... -run \"TestExamples|TestScriptsWithProjects\"",
"update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go",
"tidy": "go mod tidy",
},
},
}