Skip to content

Latest commit

 

History

History
147 lines (120 loc) · 3.19 KB

devbox.md

File metadata and controls

147 lines (120 loc) · 3.19 KB

devbox

Instant, easy, and predictable development environments

Getting Started

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

Scripts are custom commands that can be run using this project's environment. This project has the following scripts:

Environment

GOENV="off"
PATH="$PATH:$PWD/dist"

Shell Init Hook

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

Packages

Script Details

devbox run build

Build devbox for the current platform

go build -o dist/devbox ./cmd/devbox

devbox run build-all

devbox run build-darwin-amd64
devbox run build-darwin-arm64
devbox run build-linux-amd64
devbox run build-linux-arm64

devbox run build-darwin-amd64

GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox

devbox run build-darwin-arm64

GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox

devbox run build-linux-amd64

GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox

devbox run build-linux-arm64

GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox

devbox run code

Open VSCode

code .

devbox run fmt

scripts/gofumpt.sh

devbox run lint

golangci-lint run --timeout 5m && scripts/gofumpt.sh

devbox run test

go test -race -cover ./...

devbox run tidy

go mod tidy

devbox run update-examples

devbox run build && go run testscripts/testrunner/updater/main.go