# 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