Skip to content

Commit

Permalink
Release 3.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Aug 30, 2022
1 parent f2a492b commit 99bed16
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@



## v3.0.0-beta.2 (2022-08-30)

#### :rocket: Enhancement
* [#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))

#### Committers: 1
- Steve Calvert ([@scalvert](https://github.com/scalvert))


## v3.0.0-beta.1 (2022-08-18)

#### :boom: Breaking Change
Expand Down
18 changes: 12 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30571,6 +30571,10 @@ async function execOpenSSLVersion() {
return output;
}
async function getOpenSSLVersion(version = '') {
const specificVersionViaInput = /^\d{1,3}\.\d{1,3}$/.test(version);
if (specificVersionViaInput) {
return `openssl-${version}`;
}
if (version === '') {
version = await execOpenSSLVersion();
}
Expand All @@ -30580,8 +30584,9 @@ async function getOpenSSLVersion(version = '') {
if (match === null) {
throw new Error(`No version of OpenSSL was found. @volta-cli/action requires a valid version of OpenSSL. ('openssl version' output: ${version})`);
}
version = match[2];
// should return in openssl-1.1 format
return `openssl-${match[2]}`;
return `openssl-${version}`;
}
/*
* Used to setup a specific shim when running volta < 0.7
Expand Down Expand Up @@ -30626,12 +30631,12 @@ async function buildLayout(voltaHome) {
await io.mkdirP(external_path_.join(voltaHome, 'tools/user'));
await setupShims(voltaHome);
}
async function acquireVolta(version, authToken) {
async function acquireVolta(version, authToken, openSSLVersion) {
//
// Download - a tool installer intimately knows how to get the tool (and construct urls)
//
core.info(`downloading volta@${version}`);
const downloadUrl = await buildDownloadUrl(external_os_.platform(), version);
const downloadUrl = await buildDownloadUrl(external_os_.platform(), version, openSSLVersion);
core.debug(`downloading from \`${downloadUrl}\``);
const downloadPath = await tool_cache.downloadTool(downloadUrl, undefined, authToken);
const voltaHome = external_path_.join(
Expand Down Expand Up @@ -30717,12 +30722,12 @@ async function getVoltaVersion(versionSpec) {
}
return version;
}
async function getVolta(versionSpec, authToken) {
async function getVolta(versionSpec, authToken, openSSLVersion) {
const version = await getVoltaVersion(versionSpec);
let voltaHome = tool_cache.find('volta', version);
if (voltaHome === '') {
// download, extract, cache
const toolRoot = await acquireVolta(version, authToken);
const toolRoot = await acquireVolta(version, authToken, openSSLVersion);
await setupVolta(version, toolRoot);
// Install into the local tool cache - node extracts with a root folder
// that matches the fileName downloaded
Expand Down Expand Up @@ -30817,7 +30822,8 @@ async function run() {
try {
const authToken = core.getInput('token', { required: false });
const voltaVersion = core.getInput('volta-version', { required: false });
await getVolta(voltaVersion, authToken);
const openSSLVersion = core.getInput('openssl-version', { required: false });
await getVolta(voltaVersion, authToken, openSSLVersion);
const hasPackageJSON = await find_up_default()('package.json');
const nodeVersion = core.getInput('node-version', { required: false });
if (nodeVersion !== '') {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@volta-cli/action",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"private": true,
"description": "Setup volta for usage in your CI runs",
"keywords": [
Expand Down

0 comments on commit 99bed16

Please sign in to comment.