mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-23 23:49:05 -06:00
ci: pass commit into commit message to test projects (#1076)
* ci: pass commit into commit message to test projects * build: remove this branch from testing binary
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
"check-more-types": "^2.24.0",
|
||||
"cloudflare-cli": "^2.1.0",
|
||||
"coffeelint": "^1.16.0",
|
||||
"commit-message-install": "^1.7.0",
|
||||
"commit-message-install": "^1.10.0",
|
||||
"common-tags": "^1.4.0",
|
||||
"console.table": "^0.9.1",
|
||||
"debug": "^2.6.8",
|
||||
|
||||
@@ -36,7 +36,10 @@ const getShortCommit = () => {
|
||||
process.env.CIRCLE_SHA1 ||
|
||||
process.env.BUILDKITE_COMMIT
|
||||
if (sha) {
|
||||
return shorten(sha)
|
||||
return {
|
||||
sha,
|
||||
short: shorten(sha),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +69,9 @@ const shortNpmVersion = getJustVersion(npm)
|
||||
console.log('short NPM version', shortNpmVersion)
|
||||
|
||||
let subject = `Testing new ${platform} Cypress version ${shortNpmVersion}`
|
||||
const shortSha = getShortCommit()
|
||||
if (shortSha) {
|
||||
subject += ` ${shortSha}`
|
||||
const commitInfo = getShortCommit()
|
||||
if (commitInfo) {
|
||||
subject += ` ${commitInfo.short}`
|
||||
}
|
||||
|
||||
// instructions for installing this binary
|
||||
@@ -80,7 +83,8 @@ const commitMessageInstructions = getInstallJson(
|
||||
npm,
|
||||
env,
|
||||
platform,
|
||||
shortNpmVersion
|
||||
shortNpmVersion, // use as version as branch name on test projects
|
||||
commitInfo && commitInfo.sha
|
||||
)
|
||||
const jsonBlock = toMarkdownJsonBlock(commitMessageInstructions)
|
||||
const footer = 'Use tool `commit-message-install` to install from above block'
|
||||
|
||||
Reference in New Issue
Block a user