Skip to content

Commit

Permalink
Merge pull request #43 from DUNE/feature/alister1_update_tagging_script
Browse files Browse the repository at this point in the history
Update tagging script after Tom tagged v00_02
  • Loading branch information
admlw authored Mar 24, 2023
2 parents 3dfebf3 + 0007b42 commit 242e47a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions ups/dune_plot_style.table
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ ACTION=SETUP

PathPrepend(PYTHONPATH, ${UPS_PROD_DIR}/python)
PathPrepend(MPLCONFIGDIR, ${UPS_PROD_DIR}/stylelib/)
PathPrepend(ROOT_INCLUDE_PATH, ${UPS_PROD_DIR}/include)
25 changes: 13 additions & 12 deletions ups/make_dune_plot_style_ups_product.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ fi

echo "Tagging ${reponame} ${version}"

source ${path}/setup_dune.sh
setup upd
source /grid/fermiapp/products/dune/setup_dune.sh

echo "Printing active products"
echo "-------------------------------------------"
Expand Down Expand Up @@ -66,6 +65,8 @@ mv ${tmpdir}/${reponame}-preorg/src/root/cpp/include ${tmpdir}/${reponame}/
mv ${tmpdir}/${reponame}-preorg/src/__init__.py ${tmpdir}/${reponame}/python/dunestyle/
mv ${tmpdir}/${reponame}-preorg/src/matplotlib/python/* ${tmpdir}/${reponame}/python/dunestyle/matplotlib
mv ${tmpdir}/${reponame}-preorg/src/root/python/* ${tmpdir}/${reponame}/python/dunestyle/root
mv ${tmpdir}/${reponame}-preorg/examples ${tmpdir}/${reponame}/
mv ${tmpdir}/${reponame}-preorg/ups/ ${tmpdir}/${reponame}/
rm -rf ${tmpdir}/${reponame}-preorg

proddir=${path}/${reponame}
Expand Down Expand Up @@ -99,6 +100,8 @@ fi
mkdir -p ${dest}
rsync --exclude '*~' --exclude '*.git' -rL $tmpdir/${reponame}/* ${dest}

chmod o+rx ${dest}

# update the ups table to give the correct version number
ups_table=${dest}/ups/${reponame}.table
if [ ! -f "${ups_table}" ] ; then
Expand All @@ -113,23 +116,21 @@ echo "Updating table file"
sed -i -e "s:XXVERSIONXX:${version}:" \
${ups_table}

echo"Declaring product ${reponame} with version ${version} to UPS."
echo "Declaring product ${reponame} with version ${version} to UPS."

# declare to ups
ups declare -f NULL -z ${path} \
-r ${path}/${reponame}/${version}/NULL \
ups declare -f NULL -z ${path} -c \
-r ${path}/${reponame}/${version}/ \
-m ${reponame}.table \
${reponame} ${version}

retval=$?
test $retval -ne 0 && echo "Error! 'ups declare' returned non-zero - BAILING" && exit 1
# I am sure there's a nicer way to do this but for now...
mv ${path}/${reponame}/${version}.version ${path}/${reponame}/NULL
mkdir ${path}/${reponame}/${version}.version/
mv ${path}/${reponame}/NULL ${path}/${reponame}/${version}.version/

# add to upd
cd ${proddir}/${version}/NULL/

upd addproduct ${reponame} ${version}
retval=$?
test $retval -ne 0 && echo "Error! 'upd addproduct' returned non-zero - BAILING" && exit 1
test $retval -ne 0 && echo "Error! 'ups declare' returned non-zero - BAILING" && exit 1

rm -rf ${tmpdir}

Expand Down

0 comments on commit 242e47a

Please sign in to comment.