improve Taskfile

This commit is contained in:
Jason Swank
2026-05-12 20:44:59 -04:00
parent 07bdbbd224
commit e0eee1c655

View File

@@ -1,11 +1,13 @@
# This taskfile handles building and deploying the petname-service # This taskfile handles building and deploying the petname-service
version: '3' version: '3'
dotenv: ['.env']
vars: vars:
DEFAULT_PROJECT_ID: "infinite-deck-479516-g6" PROJECT_ID: '{{ .PROJECT_ID }}'
REGION: "us-east4" REGION: '{{ default "us-east4" .REGION }}'
DOMAIN: '{{ .DOMAIN }}'
SERVICE_NAME: "petname" SERVICE_NAME: "petname"
DOMAIN: "proto-hype.net"
tasks: tasks:
login: login:
@@ -17,7 +19,7 @@ tasks:
Example: task init Example: task init
cmds: cmds:
- | - |
PROJECT_ID="${1:-{{ .DEFAULT_PROJECT_ID }}}" PROJECT_ID="${1:-{{ .PROJECT_ID }}}"
gcloud auth login --update-adc gcloud auth login --update-adc
gcloud config set project "$PROJECT_ID" gcloud config set project "$PROJECT_ID"
gcloud config set compute/region {{ .REGION }} gcloud config set compute/region {{ .REGION }}