Instant, easy, and predictable development environments
This project uses devbox to manage its development environment.
Install devbox:
curl -fsSL https://get.jetify.com/devbox | bash
Start the devbox shell:
devbox shell
Run a script in the devbox environment:
devbox run <script>
Scripts are custom commands that can be run using this project's environment. This project has the following scripts:
GOENV="off"
PATH="$PATH:$PWD/dist"
The Shell Init Hook is a script that runs whenever the devbox environment is instantiated. It runs
on devbox shell
and on devbox run
.
test -z $FISH_VERSION && unset CGO_ENABLED GO111MODULE GOARCH GOFLAGS GOMOD GOOS GOROOT GOTOOLCHAIN GOWORK
Build devbox for the current platform
go build -o dist/devbox ./cmd/devbox
devbox run build-darwin-amd64
devbox run build-darwin-arm64
devbox run build-linux-amd64
devbox run build-linux-arm64
GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox
GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox
GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox
GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox
Open VSCode
code .
scripts/gofumpt.sh
golangci-lint run --timeout 5m && scripts/gofumpt.sh
go test -race -cover ./...
go mod tidy
devbox run build && go run testscripts/testrunner/updater/main.go