Skip to content

Commit e00ba86

Browse files
authored
Merge pull request #110 from git-for-windows/release-arm64
slash-commands: support arm64 in release command
2 parents bba4c6a + 48596d1 commit e00ba86

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

GitForWindowsHelper/slash-commands.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ module.exports = async (context, req) => {
400400
let gitVersion
401401
let tagGitWorkflowRunID
402402
const workFlowRunIDs = {}
403-
for (const architecture of ['x86_64', 'i686']) {
403+
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
404404
const workflowName = `git-artifacts-${architecture}`
405405
const runs = await listCheckRunsForCommit(
406406
context,
@@ -447,7 +447,7 @@ module.exports = async (context, req) => {
447447
releaseCheckRunId, {
448448
output: {
449449
title: `Publish ${gitVersion} for @${commitSHA}`,
450-
summary: `Downloading the Git artifacts from ${workFlowRunIDs['x86_64']} and ${workFlowRunIDs['i686']} and publishing them as a new GitHub Release at ${owner}/${repo}`
450+
summary: `Downloading the Git artifacts from ${workFlowRunIDs['x86_64']}, ${workFlowRunIDs['i686']} and ${workFlowRunIDs['aarch64']} and publishing them as a new GitHub Release at ${owner}/${repo}`
451451
}
452452
}
453453
)
@@ -461,7 +461,8 @@ module.exports = async (context, req) => {
461461
'release-git.yml',
462462
'main', {
463463
git_artifacts_x86_64_workflow_run_id: workFlowRunIDs['x86_64'],
464-
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686']
464+
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686'],
465+
git_artifacts_aarch64_workflow_run_id: workFlowRunIDs['aarch64'],
465466
}
466467
)
467468

__tests__/index.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,11 @@ let mockQueueCheckRun = jest.fn(() => 'check-run-id')
414414
let mockUpdateCheckRun = jest.fn()
415415
let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev, checkRunName) => {
416416
if (rev === 'this-will-be-rc2') {
417-
const id = checkRunName === 'git-artifacts-x86_64' ? 8664 : 686
417+
const id = {
418+
'git-artifacts-x86_64': 8664,
419+
'git-artifacts-i686': 686,
420+
'git-artifacts-aarch64': 64
421+
}[checkRunName]
418422
const output = {
419423
title: 'Build Git -rc2 artifacts',
420424
summary: 'Build Git -rc2 artifacts from commit this-will-be-rc2 (tag-git run #987)',
@@ -869,7 +873,8 @@ The \`release-git\` workflow run [was started](dispatched-workflow-release-git.y
869873
expect(dispatchedWorkflows[0].html_url).toEqual('dispatched-workflow-release-git.yml')
870874
expect(dispatchedWorkflows[0].payload.inputs).toEqual({
871875
git_artifacts_x86_64_workflow_run_id: "8664",
872-
git_artifacts_i686_workflow_run_id: "686"
876+
git_artifacts_i686_workflow_run_id: "686",
877+
git_artifacts_aarch64_workflow_run_id: "64"
873878
})
874879
})
875880

0 commit comments

Comments
 (0)