Skip to content

Commit 5bc3a6d

Browse files
committed
refactor: Added info message when database upgrade is run.
1 parent bff63c5 commit 5bc3a6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

helix-p4d/docker-startup.d/45-database-upgrade.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
set -e
44

5-
# check that the p4d service is already configured
6-
if ! gosu perforce p4dctl list 2>/dev/null | grep -q "${P4NAME}"; then
5+
# only perform database upgrade if explicitly allowed
6+
if [[ "${P4D_DATABASE_UPGRADE}" != "true" ]]; then
77
exit 0
88
fi
99

10-
# only perform database upgrade if explicitly allowed
11-
if [[ "${P4D_DATABASE_UPGRADE}" != "true" ]]; then
10+
# check that the p4d service is already configured
11+
if ! gosu perforce p4dctl list 2>/dev/null | grep -q "${P4NAME}"; then
1212
exit 0
1313
fi
1414

1515
# enable database upgrade on next run
16+
echo "Running database upgrade procedure..."
1617
gosu perforce p4dctl exec -t p4d "${P4NAME}" -- -xu

0 commit comments

Comments
 (0)