version: '3' dotenv: ['.env.{{.ENV}}'] env: ENV: development vars: MOD_NAME: gitserver.in/patialtech/rano tasks: install: desc: install packages cmds: - deno install --allow-scripts=npm:@sveltejs/kit start-graph: desc: run graph server cmds: - cmd: go run ./bin/server start-web: desc: run web in dev mode cmd: deno task dev gen: desc: use go generate, for graph files preconditions: - go mod tidy cmds: - task: graph-gen - task: ent-gen vuln-check: desc: perform go vuln check cmds: - govulncheck -show verbose ./... graph-gen: desc: graph gen cmds: - go generate ./graph graph-codegen: desc: generate graph types cmds: - cmd: deno task codegen ent-new: desc: create new db Entity cmd: cd ./db && go run -mod=mod entry.io/ent/cmd/ent new {{.name}} ent-gen: desc: generate from ent schema cmds: - go generate ./db/ent migrate-new: desc: create a new sql migration file cmds: - migrate create -ext sql -dir ./db/migrations -seq {{.name}} migrate-up: desc: apply automatically migration using Ent schema cmds: - task: ent-gen - go run ./bin/migrate-up build-web-prod: desc: apply automatically migration using Ent schema cmds: - deno task build env: ASSETS_HOST: build-prod: desc: apply automatically migration using Ent schema cmds: - task: build-web-prod - CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -ldflags "-X '{{.MOD_NAME}}/config.AppEnv=production'" -o ./server ./bin/server