...
 
Commits (5)
......@@ -10,21 +10,21 @@
# - install new module env file into /etc/modulefiles/lofar/
#
# Jenkins shell command:
# svn export --force https://svn.astron.nl/LOFAR/trunk/SubSystems/Dragnet/scripts/LOFAR-Dragnet-deploy.sh && \
# ./LOFAR-Dragnet-deploy.sh "$LOFAR_SVN_TAG" && \
# wget https://git.astron.nl/ro/lofar/-/raw/master/SubSystems/Dragnet/scripts/LOFAR-Dragnet-deploy.sh && \
# ./LOFAR-Dragnet-deploy.sh "$LOFAR_GIT_TAG" && \
# rm LOFAR-Dragnet-deploy.sh
#
# where $LOFAR_SVN_TAG is set by Jenkins. Examples: trunk or tags/LOFAR-Release-2_17_5 or branches/CEP-Pipeline-Task1234
# where $LOFAR_GIT_TAG is set by Jenkins. Examples: trunk or refs/tags/LOFAR-Release-2_17_5 or refs/heads/CEP-Pipeline-Task1234
#
# $Id$
if [ $# -eq 0 ]; then
echo "Usage: $0 LOFAR_SVN_TAG"
echo ' LOFAR_SVN_TAG: e.g.: trunk or tags/LOFAR-Release-2_17_5 or branches/CEP-Pipeline-Task1234'
echo "Usage: $0 LOFAR_GIT_TAG"
echo ' LOFAR_GIT_TAG: e.g.: refs/heads/master or refs/tags/LOFAR-Release-2_17_5 or refs/heads/CEP-Pipeline-Task1234'
exit 1
fi
lofar_svn_tag="$1"
lofar_git_tag="$1"
shift
# unload all loaded env modules to avoid accidentally depending on pkgs in PATH, LD_LIBRARY_PATH, ...
......@@ -32,7 +32,9 @@ module purge || true
# config: version, paths, hostnames
lofar_release=$(echo $lofar_svn_tag | cut -d '/' -f 2) # select tag or branch name, or trunk
lofar_release=${lofar_git_tag#refs/tags/} # select tag
lofar_release=${lofar_release#refs/heads/} # select branch name
lofar_branch=$lofar_release
lofar_release_tag_prefix=LOFAR-Release-
lofar_version=${lofar_release#$lofar_release_tag_prefix} # chop off prefix if there
......@@ -43,7 +45,7 @@ else
fi
echo $lofar_version
lofar_svn_root=https://svn.astron.nl/LOFAR
lofar_git_repo=https://git.astron.nl/ro/lofar.git
lofar_versions_root=/opt/lofar_versions
prefix=$lofar_versions_root/$lofar_release
#
......@@ -55,8 +57,8 @@ buildtype=gnucxx11_optarch # optarch enables -O3 -march=native
pushd "$tmpdir"
# check out release. Don't svn export LOFAR if you care about version strings, incl what goes into data products.
svn checkout $lofar_svn_root/$lofar_svn_tag LOFAR > /dev/null
# check out branch.
git clone $lofar_git_repo --branch $lofar_branch --depth 1 --single-branch LOFAR
# build, install into DESTDIR, and create deploy archive
mkdir -p $buildtype && cd $buildtype
......