Skip to content

Commit

Permalink
Merge pull request #110 from git-for-windows/release-arm64
Browse files Browse the repository at this point in the history
slash-commands: support arm64 in release command
  • Loading branch information
dscho authored Nov 18, 2024
2 parents bba4c6a + 48596d1 commit e00ba86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions GitForWindowsHelper/slash-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ module.exports = async (context, req) => {
let gitVersion
let tagGitWorkflowRunID
const workFlowRunIDs = {}
for (const architecture of ['x86_64', 'i686']) {
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
const workflowName = `git-artifacts-${architecture}`
const runs = await listCheckRunsForCommit(
context,
Expand Down Expand Up @@ -447,7 +447,7 @@ module.exports = async (context, req) => {
releaseCheckRunId, {
output: {
title: `Publish ${gitVersion} for @${commitSHA}`,
summary: `Downloading the Git artifacts from ${workFlowRunIDs['x86_64']} and ${workFlowRunIDs['i686']} and publishing them as a new GitHub Release at ${owner}/${repo}`
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}`
}
}
)
Expand All @@ -461,7 +461,8 @@ module.exports = async (context, req) => {
'release-git.yml',
'main', {
git_artifacts_x86_64_workflow_run_id: workFlowRunIDs['x86_64'],
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686']
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686'],
git_artifacts_aarch64_workflow_run_id: workFlowRunIDs['aarch64'],
}
)

Expand Down
9 changes: 7 additions & 2 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,11 @@ let mockQueueCheckRun = jest.fn(() => 'check-run-id')
let mockUpdateCheckRun = jest.fn()
let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev, checkRunName) => {
if (rev === 'this-will-be-rc2') {
const id = checkRunName === 'git-artifacts-x86_64' ? 8664 : 686
const id = {
'git-artifacts-x86_64': 8664,
'git-artifacts-i686': 686,
'git-artifacts-aarch64': 64
}[checkRunName]
const output = {
title: 'Build Git -rc2 artifacts',
summary: 'Build Git -rc2 artifacts from commit this-will-be-rc2 (tag-git run #987)',
Expand Down Expand Up @@ -869,7 +873,8 @@ The \`release-git\` workflow run [was started](dispatched-workflow-release-git.y
expect(dispatchedWorkflows[0].html_url).toEqual('dispatched-workflow-release-git.yml')
expect(dispatchedWorkflows[0].payload.inputs).toEqual({
git_artifacts_x86_64_workflow_run_id: "8664",
git_artifacts_i686_workflow_run_id: "686"
git_artifacts_i686_workflow_run_id: "686",
git_artifacts_aarch64_workflow_run_id: "64"
})
})

Expand Down

0 comments on commit e00ba86

Please sign in to comment.