Skip to content

Commit 0983954

Browse files
authored
Merge pull request #11061 from jimchamp/deploy-script-follow-up
Apply Copilot review notes to `deploy.sh`
2 parents 5d48905 + 818b94e commit 0983954

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

scripts/deployment/deploy.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ deploy_olsystem() {
272272
echo "Finished $REPO deployment at $(date)"
273273
echo "[Info] To reboot the servers, please run scripts/deployments/restart_all_servers.sh"
274274
if [ $CLEANUP -eq 1 ]; then
275-
cleanup "${DEPLOY_DIR}/olsystem"
275+
cleanup "${DEPLOY_DIR}/olsystem"
276276
fi
277277

278278
# Present follow-up options
@@ -298,7 +298,6 @@ date_to_timestamp() {
298298

299299
tag_deploy() {
300300
# Check if tag does NOT exist
301-
echo "${DEPLOY_DIR}/openlibrary"
302301
if ! git -C "${DEPLOY_DIR}/openlibrary" rev-parse "$DEPLOY_TAG" >/dev/null 2>&1; then
303302
echo "[Info] Tagging deploy as $DEPLOY_TAG"
304303
git -C "${DEPLOY_DIR}/openlibrary" tag "$DEPLOY_TAG"
@@ -358,8 +357,8 @@ deploy_openlibrary() {
358357
echo ""
359358

360359
if ! check_olbase_image_up_to_date; then
361-
cleanup "${DEPLOY_DIR}/openlibrary"
362-
exit 1
360+
cleanup "${DEPLOY_DIR}/openlibrary"
361+
exit 1
363362
fi
364363

365364
check_server_access
@@ -382,7 +381,7 @@ deploy_openlibrary() {
382381
cp -r openlibrary/conf openlibrary_new
383382
tar -czf openlibrary_new.tar.gz openlibrary_new
384383
if ! copy_to_servers "$DEPLOY_DIR/openlibrary_new.tar.gz" "/opt/openlibrary" "openlibrary_new"; then
385-
cleanup "${DEPLOY_DIR}/openlibrary"
384+
cleanup "${DEPLOY_DIR}/openlibrary"
386385
exit 1
387386
fi
388387
echo ""
@@ -401,7 +400,7 @@ deploy_openlibrary() {
401400
done
402401

403402
if ! prune_docker image; then
404-
cleanup "${DEPLOY_DIR}/openlibrary"
403+
cleanup "${DEPLOY_DIR}/openlibrary"
405404
exit 1
406405
fi
407406

0 commit comments

Comments
 (0)