Commit d091d918 authored by Florent Revest's avatar Florent Revest

prepare-build: Add an option to clone_dir to checkout a specific tag or hash....

prepare-build: Add an option to clone_dir to checkout a specific tag or hash. This trigger an error when running in update mode but it's useful to downgrade a layer to a specific version
parent 2dddb625
......@@ -29,6 +29,12 @@ function clone_dir {
echo -e "\e[32mCloning branch $3 of $2 in $1\e[39m"
git clone -b $3 $2 $1
[ $? -ne 0 ] && echo -e "\e[91mError cloning $1\e[39m"
if [ $# -eq 4 ]
then
pushd $1
git checkout $4
popd
fi
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment