2019-04-21 22:33:43 +02:00
|
|
|
HASH := `git rev-parse --short HEAD`
|
|
|
|
|
|
|
|
SERVICE := svelte-website
|
2019-04-22 01:07:20 +02:00
|
|
|
PROJECT := svelte-dev
|
2019-04-21 22:33:43 +02:00
|
|
|
|
|
|
|
IMAGE := gcr.io/$(PROJECT)/$(SERVICE):$(HASH)
|
|
|
|
|
2021-10-19 19:32:35 +02:00
|
|
|
sveltekit:
|
2019-04-21 22:33:43 +02:00
|
|
|
@echo "\n~> updating template & contributors list"
|
|
|
|
@npm run update
|
2021-10-19 19:32:35 +02:00
|
|
|
@echo "\n~> building SvelteKit app"
|
2020-09-11 01:55:41 +02:00
|
|
|
@npm run build
|
2019-04-21 22:33:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
docker:
|
|
|
|
@echo "\n~> building docker image"
|
2020-01-27 20:38:25 +01:00
|
|
|
@gcloud builds submit --project $(PROJECT) -t $(IMAGE)
|
2019-04-21 22:33:43 +02:00
|
|
|
|
|
|
|
|
2021-10-19 19:32:35 +02:00
|
|
|
deploy: sveltekit docker
|
2019-04-21 22:33:43 +02:00
|
|
|
@echo "\n~> deploying $(SERVICE) to Cloud Run servers"
|
2020-01-28 15:04:01 +01:00
|
|
|
@gcloud run deploy $(SERVICE) --project $(PROJECT) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi
|