Skip to content

Commit a9226ef

Browse files
author
xhlulu
committed
Update old deploy script with updated from teaser-apps
Former-commit-id: 485a9df
1 parent c11eef2 commit a9226ef

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

deploy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ main() {
7171
local is_dashr=false
7272
local tmp_shallow_clone="$(mktemp -d -t apps-XXXXXXXXXX)"
7373
local tmp_full_clone="$(mktemp -d -t apps-XXXXXXXXXX)"
74+
local app_created=false
7475
local force_push=false
7576
local push_code=false
7677
local exit_code remote_sha
@@ -104,11 +105,11 @@ main() {
104105
local redis_version="$(cat "$app_dir/requirements.txt" | grep -E "^redis=")"
105106

106107
log-info "dash python version: $(cat "$app_dir/requirements.txt" | grep -E "^dash=")"
107-
[[ -n "$celery_version" ]] && log-info "celery python version: $(cat "$app_dir/requirements.txt" | grep -E "^celery=")"
108-
[[ -n "$redis_version" ]] && log-info "redis python version: $(cat "$app_dir/requirements.txt" | grep -E "^redis=")"
108+
[[ -n "$celery_version" ]] && log-info "celery python version: $(cat "$app_dir/requirements.txt" | grep -E "^celery")"
109+
[[ -n "$redis_version" ]] && log-info "redis python version: $(cat "$app_dir/requirements.txt" | grep -E "^redis")"
109110

110-
[[ -n "$sqlalchemy_version" ]] && log-info "sqlalchemy python version: $(cat "$app_dir/requirements.txt" | grep -E "^sqlalchemy=")"
111-
[[ -n "$flask_sqlalchemy_version" ]] && log-info "flask-sqlalchemy python version: $(cat "$app_dir/requirements.txt" | grep -E "^flask-sqlalchemy=")"
111+
[[ -n "$sqlalchemy_version" ]] && log-info "sqlalchemy python version: $(cat "$app_dir/requirements.txt" | grep -E "^sqlalchemy")"
112+
[[ -n "$flask_sqlalchemy_version" ]] && log-info "flask-sqlalchemy python version: $(cat "$app_dir/requirements.txt" | grep -E "^flask-sqlalchemy")"
112113

113114
if [[ -n "$sqlalchemy_version" ]] || [[ -n "$flask_sqlalchemy_version" ]]; then
114115
if ! dds-client postgres:exists --name "$APP"; then
@@ -132,14 +133,18 @@ main() {
132133
if [[ "$CREATE_APP" == "true" ]]; then
133134
log-warn "$APP not found, creating"
134135
dds-client apps:create --name "$APP"
136+
app_created=true
135137
else
136138
log-exit "Deploy failed because there is no such app on Dash Gallery: $APP. Please use the web interface to create an app with this name"
137139
fi
138140
else
139141
log-info "exists: true"
140142
fi
141143

142-
if ! git clone --depth 1 "$remote_url" "$tmp_shallow_clone" 2>/dev/null; then
144+
# Disable sslverification
145+
git config --global http.sslVerify false
146+
147+
if ! git clone --depth 1 "$remote_url" "$tmp_shallow_clone" 2>/dev/null && [[ "$app_created" != "true" ]]; then
143148
log-fail "Unable to clone repository"
144149
fi
145150

0 commit comments

Comments
 (0)