From 30d579fc85546d505151e9e6211fa468f1e84d9e Mon Sep 17 00:00:00 2001
From: Will McCutchen <will@mccutch.org>
Date: Thu, 3 Oct 2019 12:08:40 -0700
Subject: [PATCH] Specify app engine account at deploy time

---
 Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 0cdcfcf..b2759bd 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,9 @@
 # go-httpbin:latest image use `make imagepush VERSION=latest)`
 VERSION        ?= $(shell git rev-parse --short HEAD)
 
-# Override this to deploy to a different App Engine project
+# Override these values to deploy to a different App Engine project
 GCLOUD_PROJECT ?= httpbingo
+GCLOUD_ACCOUNT ?= mccutchen@gmail.com
 
 # Built binaries will be placed here
 DIST_PATH  	  ?= dist
@@ -72,10 +73,10 @@ lint: $(GOLINT)
 # deploy & run locally
 # =============================================================================
 deploy: build
-	gcloud app deploy --quiet --project=$(GCLOUD_PROJECT) --version=$(VERSION) --promote
+	gcloud --account=$(GCLOUD_ACCOUNT) app deploy --quiet --project=$(GCLOUD_PROJECT) --version=$(VERSION) --promote
 
 stagedeploy: build
-	gcloud app deploy --quiet --project=$(GCLOUD_PROJECT) --version=$(VERSION) --no-promote
+	gcloud --account=$(GCLOUD_ACCOUNT) app deploy --quiet --project=$(GCLOUD_PROJECT) --version=$(VERSION) --no-promote
 
 run: build
 	$(DIST_PATH)/go-httpbin
-- 
GitLab