@aircall/ci-scripts
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -10,3 +10,4 @@ #!/usr/bin/env node | ||
getPreviousRelease, | ||
getPreviousReleaseFromSha1 | ||
getPreviousReleaseFromSha1, | ||
getReleaseFromSha1 | ||
} = require('./github.js'); | ||
@@ -177,4 +178,11 @@ const { | ||
case 'latest_version': | ||
const latestReleasedTag = await getLatestReleasedTag(); | ||
console.log(!!latestReleasedTag ? latestReleasedTag.tag : 'No release created yet'); | ||
if (options.fromCircleCISha1){ | ||
const releaseFromSha1 = await getReleaseFromSha1(process.env['CIRCLE_SHA1']); | ||
console.log( | ||
!!releaseFromSha1 ? releaseFromSha1.tag_name : 'No release found for this SHA-1' | ||
); | ||
} else { | ||
const latestReleasedTag = await getLatestReleasedTag(); | ||
console.log(!!latestReleasedTag ? latestReleasedTag.tag : 'No release created yet'); | ||
} | ||
break; | ||
@@ -181,0 +189,0 @@ |
{ | ||
"name": "@aircall/ci-scripts", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "main": "ci-scripts.js", |
38560
967
5