Files
softplayer-backend/Taskfile.yml
Nikolai Rodionov c52c3d1046
All checks were successful
ci/woodpecker/push/build Pipeline was successful
WIP: Start implementing the internal auth
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
2026-05-05 22:56:56 +02:00

54 lines
1.6 KiB
YAML

# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
build:
desc: Build go code
cmd: go build -o ./build/softplayer
silent: true
run-migrations-dev:
desc: Execute database migrations
env:
SOFTPLAYER_DB_CONNECTION_STRING: postgres://softplayer:qwertyu9@localhost:30432/softplayer?sslmode=disable
cmd: go run main.go migrate --migrations-path=file://migrations
run-server-dev:
desc: Run the local dev server
env:
SOFTPLAYER_DB_CONNECTION_STRING: postgres://softplayer:qwertyu9@localhost:30432/softplayer?sslmode=disable
SOFTPLAYER_REDIS_HOST: localhost:30379
cmd: go run main.go serve --dev-mode --reflection
deploy-local-env:
desc: Run a kind cluster and deploy deps
deps:
- kind-cluster
- helmfile-deploy
kind-cluster:
desc: Run a kind cluster
cmd: kind create cluster --config ./kind-config.yaml
kind-cluster-remove:
desc: Remove the kind cluster
cmd: kind delete cluster
helmfile-deploy:
desc: Deploy the helmfile for the local dev
cmd: helmfile apply
get-proto-from-branch:
desc: Get the latest version of generated protobuf code from the branch
silent: true
vars:
WORKDIR:
sh: mktemp -d
cmds:
- git clone git@gitea.badhouseplants.net:softplayer/softplayer-go-proto.git '{{ .WORKDIR }}'
- git -C '{{ .WORKDIR }}' checkout '{{ .CLI_ARGS }}'
- go get gitea.badhouseplants.net/softplayer/softplayer-go-proto@$(git -C '{{ .WORKDIR }}' rev-parse HEAD)
- rm -rf '{{ .WORKDIR }}'
- go mod tidy