mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-22 07:00:22 -05:00
Add arch to commit message install (#3923)
- add `arch` and `status` fields to the commit message when testing other projects - status is needed to enable GitHub commit status checks for this build - renamed a couple of test jobs Example commit message with this change in https://github.com/cypress-io/cypress-test-node-versions/commit/61c24b20006e1de91a8cff77de726d485191bb0d <img width="1011" alt="Screen Shot 2019-04-09 at 11 39 31 AM" src="https://user-images.githubusercontent.com/2212006/55814270-2c97ad00-5abc-11e9-8a6d-27fcec214130.png">
This commit is contained in:
committed by
Zach Bloomquist
parent
db752f5f93
commit
8968e7fc87
@@ -16,11 +16,13 @@ const { npm, binary } = getNameAndBinary(process.argv)
|
||||
la(is.unemptyString(npm), 'missing npm url')
|
||||
la(is.unemptyString(binary), 'missing binary url')
|
||||
const platform = os.platform()
|
||||
const arch = os.arch()
|
||||
|
||||
console.log('bumping versions for other projects')
|
||||
console.log('npm:', npm)
|
||||
console.log('binary:', binary)
|
||||
console.log('platform:', platform)
|
||||
console.log(' npm:', npm)
|
||||
console.log(' binary:', binary)
|
||||
console.log(' platform:', platform)
|
||||
console.log(' arch:', arch)
|
||||
|
||||
const cliOptions = minimist(process.argv, {
|
||||
string: 'provider',
|
||||
@@ -87,13 +89,30 @@ if (commitInfo) {
|
||||
const env = {
|
||||
CYPRESS_INSTALL_BINARY: binary,
|
||||
}
|
||||
const commitMessageInstructions = getInstallJson(
|
||||
npm,
|
||||
|
||||
// also pass "status" object that points back at this repo and this commit
|
||||
// so that other projects can report their test success as GitHub commit status check
|
||||
let status = null
|
||||
const commit = commitInfo && commitInfo.sha
|
||||
|
||||
if (commit && is.commitId(commit)) {
|
||||
// commit is full 40 character hex string
|
||||
status = {
|
||||
owner: 'cypress-io',
|
||||
repo: 'cypress',
|
||||
sha: commit,
|
||||
}
|
||||
}
|
||||
|
||||
const commitMessageInstructions = getInstallJson({
|
||||
packages: npm,
|
||||
env,
|
||||
platform,
|
||||
shortNpmVersion, // use as version as branch name on test projects
|
||||
commitInfo && commitInfo.sha
|
||||
)
|
||||
arch,
|
||||
branch: shortNpmVersion, // use as version as branch name on test projects
|
||||
commit,
|
||||
status,
|
||||
})
|
||||
const jsonBlock = toMarkdownJsonBlock(commitMessageInstructions)
|
||||
const footer = 'Use tool `commit-message-install` to install from above block'
|
||||
let message = `${subject}\n\n${jsonBlock}\n${footer}\n`
|
||||
|
||||
Reference in New Issue
Block a user