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:
Gleb Bahmutov
2017-12-15 15:34:31 -05:00
committed by GitHub
parent e0da78ee66
commit a559801eb2
2 changed files with 10 additions and 6 deletions

View File

@@ -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",

View File

@@ -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'