diff --git a/.github/workflows/archiver.sh b/.github/workflows/archiver.sh index af2908681a..2fe85e849d 100755 --- a/.github/workflows/archiver.sh +++ b/.github/workflows/archiver.sh @@ -9,20 +9,30 @@ echo "Executing $0 $*" topdir=$(cd $(dirname $0)/../..; pwd) +# Check that all git submodules have been updated +cd ${topdir}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT +if ! git submodule status | grep '^ ' > /dev/null; then + echo "ERROR! There are git submodules that need to be updated" + git submodule status + exit 1 +fi + # Create a temporary directory and a VERSION.txt file tmpdir=$(mktemp -d) outdir=${tmpdir}/CUDACPP_OUTPUT mkdir ${outdir} -cd ${topdir}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT outfile=${outdir}/VERSION.txt touch ${outfile} dateformat='%Y-%m-%d_%H:%M:%S UTC' +echo "(From CUDACPP_OUTPUT/__init__.py)" >> ${outfile} echo "cudacpp_version = $(cat __init__.py | awk '/__version__/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} -echo "mg5_version_current = $(cat ../../../../../MG5aMC/mg5amcnlo/VERSION | awk '/version =/{print $3}' | sed -r 's/[^0-9.]//g')" >> ${outfile} -echo "" >> ${outfile} echo "mg5_version_minimal = $(cat __init__.py | awk '/minimal_mg5amcnlo_version/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} echo "mg5_version_latest_validated = $(cat __init__.py | awk '/latest_validated_version/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} echo "" >> ${outfile} +echo "(From MG5AMC/mg5amcnlo)" >> ${outfile} +echo "mg5_version_current = $(cat ../../../../../MG5aMC/mg5amcnlo/VERSION | awk '/version =/{print $3}' | sed -r 's/[^0-9.]//g')" >> ${outfile} +echo "mg5_commit_current = $(git submodule status | awk '/ MG5aMC\/mg5amcnlo /{print substr($1,0,9)}')" >> ${outfile} +echo "" >> ${outfile} echo "TARBALL DATE: $(date -u +"${dateformat}")" >> ${outfile} echo "" >> ${outfile} TZ=UTC git --no-pager log -n1 --date=format-local:"${dateformat}" --pretty=format:'commit %h%nAuthor: %an%nAuthorDate: %ad%nCommitter: %cn%nCommitterDate: %cd%nMessage: "%s"%n' >> ${outfile}