Skip to content

Commit 3c899ed

Browse files
authored
Merge pull request #21 from dscho/deploy-also-arm64-packages
/deploy: also trigger clang-aarch64 builds when appropriate
2 parents b033b93 + 9e2801f commit 3c899ed

2 files changed

Lines changed: 40 additions & 3 deletions

File tree

GitForWindowsHelper/component-updates.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ const isMSYSPackage = package_name => {
4141
&& !package_name.startsWith('mingw-w64-')
4242
}
4343

44+
const needsSeparateARM64Build = package_name => {
45+
if (package_name === 'git-extra') return true
46+
return package_name.startsWith('mingw-w64-') && ![
47+
'mingw-w64-git-credential-manager',
48+
'mingw-w64-git-lfs',
49+
'mingw-w64-wintoast'
50+
].includes(package_name)
51+
}
52+
4453
const guessReleaseNotes = (issue) => {
4554
if (!issue.pull_request
4655
&&issue.labels.filter(label => label.name === 'component-update').length !== 1) throw new Error(`Cannot determine release note from issue ${issue.number}`)
@@ -62,5 +71,6 @@ module.exports = {
6271
guessComponentUpdateDetails,
6372
guessReleaseNotes,
6473
prettyPackageName,
65-
isMSYSPackage
74+
isMSYSPackage,
75+
needsSeparateARM64Build
6676
}

GitForWindowsHelper/slash-commands.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ module.exports = async (context, req) => {
115115

116116
await checkPermissions()
117117

118-
const { guessComponentUpdateDetails, isMSYSPackage } = require('./component-updates')
118+
const { guessComponentUpdateDetails, isMSYSPackage, needsSeparateARM64Build } = require('./component-updates')
119119
const { package_name } = deployMatch[2]
120120
? { package_name: deployMatch[2] }
121121
: guessComponentUpdateDetails(req.body.issue.title, req.body.issue.body)
@@ -162,6 +162,30 @@ module.exports = async (context, req) => {
162162
text
163163
)
164164
if (!isMSYSPackage(package_name)) {
165+
let aarch64Answer
166+
if (needsSeparateARM64Build(package_name)) {
167+
const aarch64Id = await queueCheckRun(
168+
context,
169+
await getToken(),
170+
'git-for-windows',
171+
repo,
172+
ref,
173+
'deploy_aarch64',
174+
`Build and deploy ${package_name}`,
175+
`Deploying ${package_name}`
176+
)
177+
aarch64Answer = await triggerBuild('aarch64')
178+
await updateCheckRun(
179+
context,
180+
await getToken(),
181+
'git-for-windows',
182+
repo,
183+
aarch64Id, {
184+
details_url: aarch64Answer.html_url
185+
}
186+
)
187+
}
188+
165189
const id = await queueCheckRun(
166190
context,
167191
await getToken(),
@@ -174,7 +198,10 @@ module.exports = async (context, req) => {
174198
)
175199

176200
const answer = await triggerBuild()
177-
const answer2 = await appendToComment(`The workflow run [was started](${answer.html_url})`)
201+
const answer2 = await appendToComment(aarch64Answer
202+
? `The [i686/x86_64](${answer.html_url}) and the [amd64](${aarch64Answer.html_url}) workflow runs were started.`
203+
: `The workflow run [was started](${answer.html_url}).`
204+
)
178205
await updateCheckRun(
179206
context,
180207
await getToken(),

0 commit comments

Comments
 (0)