Skip to content

Commit

Permalink
HPCC4J-553 Github Actions: Add baremetal test workflow
Browse files Browse the repository at this point in the history
- Fixed issue with version being returned as a string for master
- Fixed logic when determining version to test against for master

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu committed Jan 31, 2024
1 parent 87c36bf commit 3642254
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/baremetal-regression-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
def extractVersion(versionStr):
parts = versionStr.split('.')
if len(parts) != 3:
print('Invalid version: ' + version)
print('Invalid version: ' + versionStr)
sys.exit(1)
if parts[2].lower() == 'x':
parts[2] = '0'
Expand Down Expand Up @@ -84,17 +84,12 @@ jobs:
print('Unable to extract version from git tag: ' + latestGitTag)
sys.exit(2)
def buildVersionString(version):
major, minor, point = map(int, version)
return f'{major}.{minor}.{point}'
def getLatestBranchVersion(branchName):
latestVersion = getTagVersionForCmd("git tag --list 'hpcc4j_*-release' --sort=-v:refname | head -n 1")
# If we are merging into master we assume it is going into the next minor release
if branchName == 'master':
return buildVersionString([latestVersion[0], latestVersion[1] + 2, 0])
return [latestVersion[0], latestVersion[1], latestVersion[2]]
else:
# Extract candidate branch major / minor version
candidateBranchPattern = re.compile(r'candidate-([0-9]+\.[0-9]+\.([0-9]+|x)).*')
Expand Down

0 comments on commit 3642254

Please sign in to comment.