Skip to content
Snippets Groups Projects
Commit a609f8e9 authored by Graeme A Stewart's avatar Graeme A Stewart Committed by Graeme Stewart
Browse files

Add override environment variables for AtlasExternals and Gaudi checkouts

Add some environment variables with a standard pattern of
External_URL and External_REF that control the repository
URL and refrence used in the checkout scripts. This makes
it much easier to test changes to these repositories
before they are merged into the main repos. The special
value "current" for the URL signals no clone or checkout
and leaves the current checkout in place, so that even
uncommitted changes can be tested.


Former-commit-id: 061edbfd49e1c4a58724ef6817f6cf0e3ed84652
parent 746100c3
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,13 @@ usage() {
echo " -t branch/tag: Mandatory branch/tag/hash to check out"
echo " -s directory: Mandatory source directory to use"
echo " -e url: Optional source URL to use for the checkout"
echo
echo " This script will allow the environment variables"
echo " Gaudi_URL and Gaudi_REF to override"
echo " other values (even those on the command line)"
echo " If Gaudi_URL is set to 'current' then"
echo " no clone or checkout is done and the working copy"
echo " in the source directory is left untouched."
}
# Parse the command line arguments:
......@@ -52,6 +59,20 @@ while getopts ":t:o:s:e:h" opt; do
esac
done
if [ "$Gaudi_URL" != "" ]; then
GAUDIURL=$Gaudi_URL
echo "Gaudi URL overridden to $GAUDIURL from environment"
if [ "$Gaudi_URL" = "current" ]; then
echo "Leaving current checkout in place for build"
exit 0
fi
fi
if [ "$Gaudi_REF" != "" ]; then
TAGBRANCH=$Gaudi_REF
echo "Gaudi ref overridden to $TAGBRANCH from environment"
fi
# The tag/branch and a source directory must have been specified:
if [ "$TAGBRANCH" = "" ] || [ "$SOURCEDIR" = "" ]; then
echo "Not all required arguments were provided!"
......
......@@ -18,6 +18,13 @@ usage() {
echo " -t branch/tag: Mandatory branch/tag/hash to check out"
echo " -s directory: Mandatory source directory to use"
echo " -e url: Optional source URL to use for the checkout"
echo
echo " This script will allow the environment variables"
echo " AtlasExternals_URL and AtlasExternals_REF to override"
echo " other values (even those on the command line)."
echo " If AtlasExternals_URL is set to 'current' then"
echo " no clone or checkout is done and the working copy"
echo " in the source directory is left untouched."
}
# Parse the command line arguments:
......@@ -52,6 +59,20 @@ while getopts ":t:o:s:e:h" opt; do
esac
done
if [ "$AtlasExternals_URL" != "" ]; then
EXTERNALSURL=$AtlasExternals_URL
echo "Externals URL overridden to $EXTERNALSURL from environment"
if [ "$AtlasExternals_URL" = "current" ]; then
echo "Leaving current checkout in place for build"
exit 0
fi
fi
if [ "$AtlasExternals_REF" != "" ]; then
TAGBRANCH=$AtlasExternals_REF
echo "Externals ref overridden to $TAGBRANCH from environment"
fi
# The tag/branch and a source directory must have been specified:
if [ "$TAGBRANCH" = "" ] || [ "$SOURCEDIR" = "" ]; then
echo "Not all required arguments were provided!"
......
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