Skip to content

Commit 99bed16

Browse files
author
Robert Jackson
committed
Release 3.0.0-beta.2
1 parent f2a492b commit 99bed16

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33

44

5+
## v3.0.0-beta.2 (2022-08-30)
6+
7+
#### :rocket: Enhancement
8+
* [#98](https://github.com/volta-cli/action/pull/98) Allow explicitly specifying `openssl-version` (on self-hosted environments the `openssl` command may not be on `$PATH`) ([@scalvert](https://github.com/scalvert))
9+
10+
#### Committers: 1
11+
- Steve Calvert ([@scalvert](https://github.com/scalvert))
12+
13+
514
## v3.0.0-beta.1 (2022-08-18)
615

716
#### :boom: Breaking Change

dist/index.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30571,6 +30571,10 @@ async function execOpenSSLVersion() {
3057130571
return output;
3057230572
}
3057330573
async function getOpenSSLVersion(version = '') {
30574+
const specificVersionViaInput = /^\d{1,3}\.\d{1,3}$/.test(version);
30575+
if (specificVersionViaInput) {
30576+
return `openssl-${version}`;
30577+
}
3057430578
if (version === '') {
3057530579
version = await execOpenSSLVersion();
3057630580
}
@@ -30580,8 +30584,9 @@ async function getOpenSSLVersion(version = '') {
3058030584
if (match === null) {
3058130585
throw new Error(`No version of OpenSSL was found. @volta-cli/action requires a valid version of OpenSSL. ('openssl version' output: ${version})`);
3058230586
}
30587+
version = match[2];
3058330588
// should return in openssl-1.1 format
30584-
return `openssl-${match[2]}`;
30589+
return `openssl-${version}`;
3058530590
}
3058630591
/*
3058730592
* Used to setup a specific shim when running volta < 0.7
@@ -30626,12 +30631,12 @@ async function buildLayout(voltaHome) {
3062630631
await io.mkdirP(external_path_.join(voltaHome, 'tools/user'));
3062730632
await setupShims(voltaHome);
3062830633
}
30629-
async function acquireVolta(version, authToken) {
30634+
async function acquireVolta(version, authToken, openSSLVersion) {
3063030635
//
3063130636
// Download - a tool installer intimately knows how to get the tool (and construct urls)
3063230637
//
3063330638
core.info(`downloading volta@${version}`);
30634-
const downloadUrl = await buildDownloadUrl(external_os_.platform(), version);
30639+
const downloadUrl = await buildDownloadUrl(external_os_.platform(), version, openSSLVersion);
3063530640
core.debug(`downloading from \`${downloadUrl}\``);
3063630641
const downloadPath = await tool_cache.downloadTool(downloadUrl, undefined, authToken);
3063730642
const voltaHome = external_path_.join(
@@ -30717,12 +30722,12 @@ async function getVoltaVersion(versionSpec) {
3071730722
}
3071830723
return version;
3071930724
}
30720-
async function getVolta(versionSpec, authToken) {
30725+
async function getVolta(versionSpec, authToken, openSSLVersion) {
3072130726
const version = await getVoltaVersion(versionSpec);
3072230727
let voltaHome = tool_cache.find('volta', version);
3072330728
if (voltaHome === '') {
3072430729
// download, extract, cache
30725-
const toolRoot = await acquireVolta(version, authToken);
30730+
const toolRoot = await acquireVolta(version, authToken, openSSLVersion);
3072630731
await setupVolta(version, toolRoot);
3072730732
// Install into the local tool cache - node extracts with a root folder
3072830733
// that matches the fileName downloaded
@@ -30817,7 +30822,8 @@ async function run() {
3081730822
try {
3081830823
const authToken = core.getInput('token', { required: false });
3081930824
const voltaVersion = core.getInput('volta-version', { required: false });
30820-
await getVolta(voltaVersion, authToken);
30825+
const openSSLVersion = core.getInput('openssl-version', { required: false });
30826+
await getVolta(voltaVersion, authToken, openSSLVersion);
3082130827
const hasPackageJSON = await find_up_default()('package.json');
3082230828
const nodeVersion = core.getInput('node-version', { required: false });
3082330829
if (nodeVersion !== '') {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@volta-cli/action",
3-
"version": "3.0.0-beta.1",
3+
"version": "3.0.0-beta.2",
44
"private": true,
55
"description": "Setup volta for usage in your CI runs",
66
"keywords": [

0 commit comments

Comments
 (0)