Skip to content

Commit d3555be

Browse files
committed
add logs
1 parent f02cc87 commit d3555be

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

start.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
exit_trap () {
44
local lc="$BASH_COMMAND" rc=$?
5+
echo "Exit trap triggered with command: [$lc] and exit code [$rc]"
56
if [ "$rc" = 0 ]; then
67
return
78
fi
89
if [ "$CLEAN_GIT_LOCK_FILES" = "true" ] && [ "$IS_RETRY" != "true" ]; then
10+
echo "Cleaning git lock files and retrying the script..."
911
retry_script
1012
exit $?
1113
fi
@@ -15,13 +17,15 @@ exit_trap () {
1517
retry_script () {
1618
echo "Retrying git clone operation..."
1719
cd ../
18-
rm -rf $CLONE_DIR
20+
rm -rf "$CLONE_DIR"
1921
export IS_RETRY=true
20-
$0 $@
22+
echo "Re-executing script with arguments: $@"
23+
$0 "$@"
2124
}
2225

2326
git_retry () {
2427
# Retry git on exit code 128
28+
echo "Executing git command with retry logic: $@"
2529
(
2630
set +e
2731
RETRY_ON_SIGNAL=128
@@ -205,6 +209,7 @@ if [ -d "$CLONE_DIR" ]; then
205209
else
206210
echo "Fetching updates from origin"
207211
git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH}
212+
echo "DONE Fetching updates from origin"
208213
fi
209214

210215
git remote set-head origin --auto

0 commit comments

Comments
 (0)