-
Notifications
You must be signed in to change notification settings - Fork 16
/
deploy-explo-live.bat
49 lines (49 loc) · 1.5 KB
/
deploy-explo-live.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@ECHO OFF
ECHO Deploy an update to Explo Development App Server
ECHO *** Run me from the Google Cloud SDK Shell! ***
set PROJECT_ID=explo-live
set GOOGLE_APPLICATION_CREDENTIALS="resources\explo-live-0d431e5fcf4a.json"
:CHECKS
IF /i "%1" EQU "SKRAFLSTATS" GOTO STATS
IF /i "%1" EQU "STATS" GOTO STATS
IF /i "%1" EQU "S" GOTO STATS
IF /i "%1" EQU "INDEXES" GOTO INDEXES
IF /i "%1" EQU "INDEX" GOTO INDEXES
IF /i "%1" EQU "IX" GOTO INDEXES
IF /i "%1" EQU "I" GOTO INDEXES
IF /i "%1" EQU "CRON" GOTO CRON
IF /i "%1" EQU "C" GOTO CRON
IF /i "%1" EQU "DEFAULT" GOTO DEFAULT
IF /i "%1" EQU "D" GOTO DEFAULT
ECHO Full deployment (app + skraflstats) starting
cmd.exe /c "npx grunt make"
ECHO *** Currently disabled ***
ECHO Full deployment completed
GOTO :EOF
:DEFAULT
IF "%2" EQU "" GOTO NOVERSION
ECHO Default module deployment starting, version '%2'
cmd.exe /c "npx grunt make"
gcloud app deploy --no-cache --version=%2 --no-promote --project=explo-live app-explo-live.yaml
ECHO Default module deployment completed
GOTO :EOF
:NOVERSION
ECHO Version is missing; enter deploy D[EFAULT] version
GOTO :EOF
:INDEXES
ECHO Index update starting
gcloud app deploy --project=explo-live index.yaml
rem gcloud datastore indexes cleanup --project=explo-live index.yaml
ECHO Index update completed
GOTO :EOF
:CRON
ECHO Cron update starting
gcloud app deploy --project=explo-live cron.yaml
ECHO Cron update completed
GOTO :EOF
:STATS
ECHO Skraflstats deployment starting
ECHO *** Currently disabled ***
ECHO Skraflstats deployment completed
GOTO :EOF
:EOF