Skip to content
Snippets Groups Projects
Commit 7d4bb736 authored by garciadeblas's avatar garciadeblas
Browse files

SO and UI start_build changed to support checking out a commit-id, branch or tag


Change-Id: Id28634bc44898cbfe4e548c3767ce74aff6bba5c
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 63dd284a
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,14 @@ else
fi
if [ $# -gt 0 ]; then
INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
if [ "$1" = "checkout" ]; then
INFO "Code to compile: '$2'"
git checkout $2
else
INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
fi
else
INFO "Code to compile: master"
git checkout master
......
......@@ -39,9 +39,14 @@ else
fi
if [ $# -gt 0 ]; then
INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
if [ "$1" = "checkout" ]; then
INFO "Code to compile: '$2'"
git checkout $2
else
INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
fi
else
INFO "Code to compile: master"
git checkout master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment