latex-packages/.ci/deploy/deploy_message.py
Maximilian Keßler 298e515a51
Some checks failed
Build LaTeX packages / build (push) Failing after 24s
Build LaTeX packages / deploy-pages (push) Has been skipped
fix environment variable
2023-10-18 11:04:38 +02:00

19 lines
538 B
Python

import os
def get_latest_commit(repo):
if repo.head.is_detached:
return repo.head.commit
else:
return repo.head.ref.commit
def get_deploy_message(repo):
old_msg = get_latest_commit(repo).message
return "{old_msg}\n" \
"\n" \
"Build branch {branch} ({hexsha}) from {repo_name}" \
.format(old_msg=old_msg,
branch=os.environ['REF_NAME'],
hexsha=get_latest_commit(repo).hexsha[0:7],
repo_name='kesslermaximilian/LatexPackages')