[!NOTE] You can use
xc
(https://xcfile.dev/) to run the commandsSee https://xcfile.dev/getting-started/#installation for installation instructions
Init development environment.
Run: once
if [ ! -f .env ]; then
cp .env.example .env
fi
if [ ! -f .env.test ]; then
cp .env.test.example .env.test
fi
Check golang code.
Requires: init, fmt, vet, lint, test RunDeps: async
Format golang code.
Requires: init
go fmt ./...
Lint golang code.
Requires: init
golangci-lint run
Vet golang code.
Requires: init
go vet ./...
Test golang code.
Requires: init, up, migrate:apply
go test ./...
Build golang code.
Requires: init, gen
go build -o bin/kizuna cmd/kizuna/main.go
Generate golang code.
Requires: init
go generate ./...
Up the development environment.
Requires: init
docker compose up -d
Dry run the migrations.
Requires: init, up
go run cmd/migration/main.go --dry | sqlfluff fix - --dialect postgres
Apply the migrations.
Requires: init, up
go run cmd/migration/main.go
Down the development environment.
Requires: init
docker compose down
Down the development environment and remove volumes.
Requires: init
docker compose down -v
Run the development environment.
Requires: init, up, migrate:apply
go run cmd/kizuna/main.go
Run the cli.
Requires: init, up, migrate:apply
echo "RUN: go run cmd/kizuna-cli/main.go"
go clean -testcache