Skip to content

Commit

Permalink
[install] in archiver.sh, add mg5_hash_current to VERSION.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
valassi committed Oct 2, 2024
1 parent dac43e8 commit b655666
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/archiver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit b655666

Please sign in to comment.