Skip to content

Commit

Permalink
Release 3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 18, 2022
1 parent 7c92d20 commit 007b150
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@




## v3.0.3 (2022-10-18)

#### :bug: Bug Fix
* [#118](https://github.com/volta-cli/action/pull/118) [BACKPORT] Add volta@1.1.0 support to v3.x releases. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))


## v3.0.2 (2022-09-01)

#### :bug: Bug Fix
Expand Down
49 changes: 34 additions & 15 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22674,22 +22674,41 @@ async function getLatestVolta(authToken) {
function voltaVersionHasSetup(version) {
return semver.gte(version, '0.7.0');
}
async function buildDownloadUrl(platform, version, openSSLVersion = '') {
async function buildDownloadUrl(platform, arch, version, openSSLVersion = '') {
let fileName;
switch (platform) {
case 'darwin':
fileName = `volta-${version}-macos.tar.gz`;
break;
case 'linux': {
openSSLVersion = await getOpenSSLVersion(openSSLVersion);
fileName = `volta-${version}-linux-${openSSLVersion}.tar.gz`;
break;
const isOpenSSLDependent = semver.lt(version, '1.1.0');
if (isOpenSSLDependent) {
switch (platform) {
case 'darwin':
fileName = `volta-${version}-macos.tar.gz`;
break;
case 'linux': {
openSSLVersion = await getOpenSSLVersion(openSSLVersion);
fileName = `volta-${version}-linux-${openSSLVersion}.tar.gz`;
break;
}
case 'win32':
fileName = `volta-${version}-windows-x86_64.msi`;
break;
default:
throw new Error(`your platform ${platform} is not yet supported`);
}
}
else {
switch (platform) {
case 'darwin':
fileName = `volta-${version}-macos${arch === 'arm64' ? '-aarch64' : ''}.tar.gz`;
break;
case 'linux': {
fileName = `volta-${version}-linux.tar.gz`;
break;
}
case 'win32':
fileName = `volta-${version}-windows-x86_64.msi`;
break;
default:
throw new Error(`your platform ${platform} is not yet supported`);
}
case 'win32':
fileName = `volta-${version}-windows-x86_64.msi`;
break;
default:
throw new Error(`your platform ${platform} is not yet supported`);
}
return `https://github.com/volta-cli/volta/releases/download/v${version}/${fileName}`;
}
Expand Down Expand Up @@ -22773,7 +22792,7 @@ 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, openSSLVersion);
const downloadUrl = await buildDownloadUrl(external_os_.platform(), external_os_.arch(), version, openSSLVersion);
core.debug(`downloading from \`${downloadUrl}\``);
const downloadPath = await tool_cache.downloadTool(downloadUrl, undefined, authToken);
const voltaHome = external_path_.join(
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.2",
"version": "3.0.3",
"private": true,
"description": "Setup volta for usage in your CI runs",
"keywords": [
Expand Down

0 comments on commit 007b150

Please sign in to comment.