Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 10.1.17
version: 10.1.18
18 changes: 15 additions & 3 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ delete_process_lock_files () {
fi
}

git_checkout () {
revision="$REVISION"
# when revision is Gerrit branch we need to fetch it explicitly
if [[ "$REVISION" =~ ^refs/changes/[0-9]+/[0-9]+/[0-9]+$ ]]; then
echo "Fetching Gerrit Change ref: $REVISION"
git_retry git fetch origin $REVISION
revision="FETCH_HEAD"
fi

git checkout $revision
}

trap exit_trap EXIT
set -e

Expand Down Expand Up @@ -165,7 +177,7 @@ if [ -d "$CLONE_DIR" ]; then
if [ -n "$REVISION" ]; then

echo "Updating repository to revision $REVISION"
git checkout $REVISION
git_checkout

CURRENT_BRANCH="`git branch 2>/dev/null | grep '^*' | cut -d' ' -f2-`"

Expand All @@ -184,7 +196,7 @@ if [ -d "$CLONE_DIR" ]; then
cd $CLONE_DIR

if [ -n "$REVISION" ]; then
git checkout $REVISION
git_checkout
fi
fi
else
Expand All @@ -193,7 +205,7 @@ else
eval $GIT_COMMAND
cd $CLONE_DIR
if [ -n "$REVISION" ]; then
git checkout $REVISION
git_checkout
fi

fi