Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cr 12345 #51

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP
  • Loading branch information
eti-codefresh committed Jan 4, 2023
commit 7c6ea59ee006567b22b9653ea45439d81545dfbb
19 changes: 8 additions & 11 deletions start.sh
Original file line number Diff line number Diff line change
@@ -98,6 +98,12 @@ if [ -n "$SPARE_CHECKOUT" ]; then
exit 0
fi

if [ -n "$DEPTH" ]; then
GIT_COMMAND=git clone $REPO $CLONE_DIR --depth=$DEPTH
else
GIT_COMMAND=git clone $REPO $CLONE_DIR
fi

# Check if the cloned dir already exists from previous builds
if [ -d "$CLONE_DIR" ]; then

@@ -139,11 +145,7 @@ if [ -d "$CLONE_DIR" ]; then
# Clean folder and clone a fresh copy on current directory
cd ..
rm -rf $CLONE_DIR
if [ -n "$DEPTH" ]; then
git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH
else
git_retry git clone $REPO $CLONE_DIR
fi
git_retry $GIT_COMMAND
cd $CLONE_DIR

if [ -n "$REVISION" ]; then
@@ -153,12 +155,7 @@ if [ -d "$CLONE_DIR" ]; then
else

# Clone a fresh copy
if [ -n "$DEPTH" ]; then
git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH
else
git_retry git clone $REPO $CLONE_DIR
fi

git_retry $GIT_COMMAND
cd $CLONE_DIR
if [ -n "$REVISION" ]; then
git checkout $REVISION