FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-docs-samples/appengine/angular/scripts/deploy.sh at master · ippuk/python-docs-samples · GitHub
ippuk
/
python-docs-samples
Public
forked from
GoogleCloudPlatform/python-docs-samples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-docs-samples
/
appengine
/
angular
/
scripts
/
deploy.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
72 lines (60 loc) · 1.39 KB
Breadcrumbs
python-docs-samples
/
appengine
/
angular
/
scripts
/
deploy.sh
Copy path
File metadata and controls
executable file
·
72 lines (60 loc) · 1.39 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!
/bin/bash
#
set
-ue
VERSION=
$(
git log -1 --pretty=format:%H
)
if
[
-n
"
$(
git status --porcelain
)
"
]
then
VERSION=
"
dirty-
$VERSION
"
fi
git status
echo
echo
-e
"
Hit [ENTER] to continue: \c
"
read
SCRIPTS_DIR=
$(
dirname
$0
)
ROOT_DIR=
$(
dirname
$SCRIPTS_DIR
)
APPCFG=
$(
which appcfg.py
)
\
||
(echo
"
ERROR: appcfg.py must be in your PATH
"
;
exit
1)
while
[
-L
$APPCFG
]
do
APPCFG=
$(
readlink
$APPCFG
)
done
BIN_DIR=
$(
dirname
$APPCFG
)
if
[
"
$(
basename
$BIN_DIR
)
"
==
"
bin
"
]
then
SDK_HOME=
$(
dirname
$BIN_DIR
)
if
[
-d
$SDK_HOME
/platform/google_appengine ]
then
SDK_HOME=
$SDK_HOME
/platform/google_appengine
fi
else
SDK_HOME=
$BIN_DIR
fi
function
get_app_id()
{
local
app_id
app_id=
$(
cat
$ROOT_DIR
/app.yaml
|
egrep
'
^application:
'
|
sed
'
s/application: *\([0-9a-z][-0-9a-z]*[0-9a-z]\).*/\1/
'
)
while
[
$#
-gt
0 ]
do
if
[
"
$1
"
==
"
-A
"
]
then
shift
app_id=
$1
elif
[
"
${1
/
=
*/
}
"
==
"
--application
"
]
then
app_id=
${1
/
--application=
/
}
fi
shift
done
echo
$app_id
}
function
deploy()
{
echo
-e
"
\n*** Rolling back any pending updates (just in case) ***\n
"
appcfg.py --oauth2
$*
rollback
.
echo
-e
"
\n*** DEPLOYING ***\n
"
appcfg.py --oauth2
$*
update -V
$VERSION
.
echo
-e
"
\n*** SETTING DEFAULT VERSION ***\n
"
appcfg.py --oauth2
$*
set_default_version -V
$VERSION
.
}
APP_ID=
$(
get_app_id
$*
)
echo
echo
"
Using app id:
$APP_ID
"
deploy
$*
-A
$APP_ID
Back
|
FazBrowse Home
|
New Git URL