Compare commits

...

2 Commits

Author SHA1 Message Date
cclecle
be9ef684e4 update jenkinsFile => no error when master build are skipped because of
no-tag
2023-03-19 10:26:23 +00:00
cclecle
792666c6ec fix: rename hash -> commit_hash to avoid using builtin symbol 2023-03-19 10:17:58 +00:00
2 changed files with 5 additions and 4 deletions

3
Jenkinsfile vendored
View File

@@ -148,7 +148,8 @@ pipeline {
{
if(sh(returnStdout: true, script: "git tag --points-at HEAD").trim().isEmpty())
{
error("master push/merge must have an explicit tag release number")
currentBuild.getRawBuild().getExecutor().doStop()
//error("master push/merge must have an explicit tag release number")
}
}

View File

@@ -155,16 +155,16 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
return result
@classmethod
def getMessage(cls, hash:str) -> str:
def getMessage(cls, commit_hash:str) -> str:
"""
retrieve a commit message from repository
Args:
hash: id of the commit
commit_hash: id of the commit
Returns:
the commit message
"""
try:
res=_exec(f"git log -z --pretty=\"tformat:%B%-C()\" -n 1 {hash}",None,True).rstrip('\x00')
res=_exec(f"git log -z --pretty=\"tformat:%B%-C()\" -n 1 {commit_hash}",None,True).rstrip('\x00')
except gitversionhelper.unknownGITFatalError as _e:
raise cls.commitNotFound("no commit found in commit history") from _e