From 273f9e1707357442aec78e43388797636ec8db4a Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Wed, 10 Jul 2019 13:00:48 -0400 Subject: [PATCH] chore: rework pre-release commit comment --- scripts/add-install-comment.js | 7 ++++--- scripts/utils.js | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/add-install-comment.js b/scripts/add-install-comment.js index 1c7b3358519f..db234c984986 100644 --- a/scripts/add-install-comment.js +++ b/scripts/add-install-comment.js @@ -39,13 +39,14 @@ console.log(' binary:', binary) console.log(' platform:', platform) console.log(' arch:', arch) -const ciName = getCIName() || 'unknown' +const ciName = getCIName() || 'Unknown CI' const buildUrl = getCIBuildUrl() -const buildInfo = buildUrl ? `The build is [here](${buildUrl})` : '' +const ciBuildLink = buildUrl ? `[${ciName} has built](${buildUrl})` : `${ciName} has built` const instructionsAt = 'https://on.cypress.io/installing-cypress#Install-pre-release-version' const preamble = stripIndent` - ${ciName} CI has built ${platform} ${arch} version of the Test Runner. ${buildInfo} + ${ciBuildLink} the \`${platform} ${arch}\` version of the Test Runner. + You can install this pre-release platform-specific build using instructions at [${instructionsAt}](${instructionsAt}). You will need to use custom \`CYPRESS_INSTALL_BINARY\` url and install Cypress using an url instead of the version. diff --git a/scripts/utils.js b/scripts/utils.js index 9d35adc58aa8..910934ec9e32 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -101,7 +101,12 @@ const getCIBuildUrl = () => { if (process.env.APPVEYOR) { // https://www.appveyor.com/docs/environment-variables/ // there is no single url, but we can form one - // TODO form AppVeyor build url + // looks like this + // https://ci.appveyor.com/project/cypress-io/cypress/builds/25882716/job/7iv75s2vjt5w4usf + return `${process.env.APPVEYOR_URL}/project/${ + process.env.APPVEYOR_ACCOUNT_NAME}/${process.env.APPVEYOR_PROJECT_SLUG + }/builds/${process.env.APPVEYOR_BUILD_ID + }/job/${process.env.APPVEYOR_JOB_ID}` } }