File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
exit_trap () {
4
4
local lc=" $BASH_COMMAND " rc=$?
5
+ echo " Exit trap triggered with command: [$lc ] and exit code [$rc ]"
5
6
if [ " $rc " = 0 ]; then
6
7
return
7
8
fi
8
9
if [ " $CLEAN_GIT_LOCK_FILES " = " true" ] && [ " $IS_RETRY " != " true" ]; then
10
+ echo " Cleaning git lock files and retrying the script..."
9
11
retry_script
10
12
exit $?
11
13
fi
@@ -15,13 +17,15 @@ exit_trap () {
15
17
retry_script () {
16
18
echo " Retrying git clone operation..."
17
19
cd ../
18
- rm -rf $CLONE_DIR
20
+ rm -rf " $CLONE_DIR "
19
21
export IS_RETRY=true
20
- $0 $@
22
+ echo " Re-executing script with arguments: $@ "
23
+ $0 " $@ "
21
24
}
22
25
23
26
git_retry () {
24
27
# Retry git on exit code 128
28
+ echo " Executing git command with retry logic: $@ "
25
29
(
26
30
set +e
27
31
RETRY_ON_SIGNAL=128
@@ -205,6 +209,7 @@ if [ -d "$CLONE_DIR" ]; then
205
209
else
206
210
echo " Fetching updates from origin"
207
211
git_retry git fetch origin --tags --prune " +refs/tags/*:refs/tags/*" ${DEPTH: + --depth=$DEPTH }
212
+ echo " DONE Fetching updates from origin"
208
213
fi
209
214
210
215
git remote set-head origin --auto
You can’t perform that action at this time.
0 commit comments