Skip to content

Commit

Permalink
[install] in archiver.sh add mg5_hash_current to VERSION.txt; in arch…
Browse files Browse the repository at this point in the history
…iver.yml, add it to the release notes
  • Loading branch information
valassi committed Oct 2, 2024
1 parent dac43e8 commit 89227c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/archiver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,32 @@
echo "Executing $0 $*"
topdir=$(cd $(dirname $0)/../..; pwd)

# Check that all git submodules have been updated
cd ${topdir}
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
mg5_commit_current=$(git submodule status | awk '/ MG5aMC\/mg5amcnlo /{print substr($1,0,9)}')

# Create a temporary directory and a VERSION.txt file
cd ${topdir}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT
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 = ${mg5_commit_current}" >> ${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
2 changes: 1 addition & 1 deletion .github/workflows/archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
echo "---" >> ${WORKDIR}/versiontag.txt
fi
echo "" >> ${WORKDIR}/versiontag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL) ' >> ${WORKDIR}/versiontag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL|mg5_commit_current) ' >> ${WORKDIR}/versiontag.txt
- name: delete_versiontag_releaseonly
# See https://cli.github.com/manual/gh_release_delete
Expand Down

0 comments on commit 89227c4

Please sign in to comment.