Skip to content

Commit

Permalink
[install] in archiver.sh/yml, improve the printout of the mg5 commit …
Browse files Browse the repository at this point in the history
…in the release notes
  • Loading branch information
valassi committed Oct 3, 2024
1 parent c82aecb commit b22adc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/archiver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if ! git submodule status | grep '^ ' > /dev/null; then
git submodule status
exit 1
fi
mg5_commit_current=$(git submodule status | awk '/ MG5aMC\/mg5amcnlo /{print substr($1,0,9)}')
mg5_commit_current=$(git submodule status | awk '/ MG5aMC\/mg5amcnlo /{print substr($1,0,7)}')

# Create a temporary directory and a VERSION.txt file
cd ${topdir}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ jobs:
# Check version tag
cudacpp_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^cudacpp_version/{print $3}')
mg5_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_version_current/{print $3}')
mg5_commit=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_commit_current/{print $3}')
echo "(From VERSION.txt) cudacpp_version = ${cudacpp_version}"
echo "(From VERSION.txt) mg5_version_current = ${mg5_version}"
echo "(From VERSION.txt) mg5_commit_current = ${mg5_commit}"
tagname_version=${TAGPREFIX}${mg5_version}_v${cudacpp_version}
echo "(From VERSION.txt) supported tagname = ${tagname_version}[_...]"
if [ "${tagname/${tagname_version}}" == "${tagname}" ]; then
Expand Down Expand Up @@ -123,6 +125,8 @@ jobs:
# Release notes for the version tag
echo "Version tag ${tagname} ([changelog](https://github.com/${REPOSITORY}/blob/${tagname}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/CHANGELOG.md))" > ${WORKDIR}/versiontag.txt
echo "" >> ${WORKDIR}/versiontag.txt
echo "Validated for mg5amcnlo version ${mg5_version} (commit [${mg5_commit}](https://github.com/mg5amcnlo/mg5amcnlo/commit/${mg5_commit}))" >> ${WORKDIR}/versiontag.txt
echo "" >> ${WORKDIR}/versiontag.txt
echo "---" >> ${WORKDIR}/versiontag.txt
if [ "${tagname_makelatest}" != "true" ]; then
echo "" >> ${WORKDIR}/versiontag.txt
Expand All @@ -137,7 +141,7 @@ jobs:
echo "---" >> ${WORKDIR}/versiontag.txt
fi
echo "" >> ${WORKDIR}/versiontag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL|mg5_commit_current) ' >> ${WORKDIR}/versiontag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL) ' >> ${WORKDIR}/versiontag.txt
- name: delete_versiontag_releaseonly
# See https://cli.github.com/manual/gh_release_delete
Expand Down Expand Up @@ -196,6 +200,10 @@ jobs:
echo "(From GITHUB_ENV) tagname_latest = ${tagname_latest}"
commit=$(cat ${WORKDIR}/VERSION.txt | awk '/^commit/{print $2}')
echo "(From VERSION.txt) commit = ${commit}"
mg5_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_version_current/{print $3}')
mg5_commit=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_commit_current/{print $3}')
echo "(From VERSION.txt) mg5_version_current = ${mg5_version}"
echo "(From VERSION.txt) mg5_commit_current = ${mg5_commit}"
# Create running tag
git config user.name github-actions
git config user.email [email protected]
Expand All @@ -206,6 +214,8 @@ jobs:
echo "Running tag ${tagname_latest} ([changelog](https://github.com/${REPOSITORY}/blob/${tagname_latest}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/CHANGELOG.md))" > ${WORKDIR}/runningtag.txt
echo "This is equivalent to version tag ${tagname}" >> ${WORKDIR}/runningtag.txt
echo "" >> ${WORKDIR}/runningtag.txt
echo "Validated for mg5amcnlo version ${mg5_version} (commit [${mg5_commit}](https://github.com/mg5amcnlo/mg5amcnlo/commit/${mg5_commit}))" >> ${WORKDIR}/runningtag.txt
echo "" >> ${WORKDIR}/runningtag.txt
echo "---" >> ${WORKDIR}/runningtag.txt
echo "" >> ${WORKDIR}/runningtag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL) ' >> ${WORKDIR}/runningtag.txt
Expand Down

0 comments on commit b22adc0

Please sign in to comment.