From 5fb6039f85f0feb440be9ef2dc4eb30f262fe1bb Mon Sep 17 00:00:00 2001 From: Javier Cervantes Villanueva Date: Mon, 15 Apr 2019 15:39:01 +0200 Subject: [PATCH] Download spack from a specific tag --- jk-setup-spack.sh | 2 +- spack_install.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/jk-setup-spack.sh b/jk-setup-spack.sh index 59e9ad1c..39708358 100755 --- a/jk-setup-spack.sh +++ b/jk-setup-spack.sh @@ -36,7 +36,7 @@ fi SPACKDIR=$WORKSPACE/spack if [ ! -d $SPACKDIR ]; then - git clone https://github.com/LLNL/spack.git $SPACKDIR + git clone https://github.com/HEP-FCC/spack.git $SPACKDIR fi export SPACK_ROOT=$SPACKDIR diff --git a/spack_install.sh b/spack_install.sh index e1e8c02a..d2fd1e36 100644 --- a/spack_install.sh +++ b/spack_install.sh @@ -46,6 +46,8 @@ while [ "$1" != "" ]; do --weekday ) shift weekday=$1 ;; + --spack-tag ) spacktag=$1 + ;; -h | --help ) usage exit ;; @@ -151,9 +153,16 @@ echo "Compiler: $PLATFORMCOMPILER" echo "Mode: $MODE" # Clone spack repo + +# Use develop if there is no tags specified (use tags to reproduce releases) +if [[ "$spacktag" == "" ]]; then + spacktag="develop" +fi + echo "Cloning spack repo" -echo "git clone https://github.com/HEP-FCC/spack.git -b develop $TMPDIR/spack" -git clone https://github.com/HEP-FCC/spack.git -b develop $TMPDIR/spack +echo "git clone https://github.com/HEP-FCC/spack.git -b $spacktag $TMPDIR/spack" +git clone https://github.com/HEP-FCC/spack.git -b $spacktag $TMPDIR/spack +check_error $? "cloning spack repo from branch/tag: $spacktag" export SPACK_ROOT=$TMPDIR/spack # Setup new spack home