Skip to content

Commit

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




## v4.0.0-beta.4 (2022-10-03)

#### :bug: Bug Fix
* [#115](https://github.com/volta-cli/action/pull/115) Add support for Volta 1.1.0 ([@rwjblue](https://github.com/rwjblue))

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


## v4.0.0-beta.3 (2022-10-03)

#### :bug: Bug Fix
Expand Down
24 changes: 21 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22922,12 +22922,14 @@ async function getLatestVoltaFromVoltaSH() {
function voltaVersionHasSetup(version) {
return semver.gte(version, '0.7.0');
}
async function buildDownloadUrl(platform, version, variant = '', openSSLVersionForTesting = '') {
async function buildDownloadUrl(platform, arch, version, variant = '', openSSLVersionForTesting = '') {
let fileName = '';
const isOpenSSLDependent = semver.lt(version, '1.1.0');
if (variant) {
fileName = `volta-${version}-${variant}.tar.gz`;
}
else {
else if (isOpenSSLDependent) {
// TODO: remove this branch when support for volta < 1.1.0 is dropped
switch (platform) {
case 'darwin':
fileName = `volta-${version}-macos.tar.gz`;
Expand All @@ -22944,6 +22946,22 @@ async function buildDownloadUrl(platform, version, variant = '', openSSLVersionF
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`);
}
}
return `https://github.com/volta-cli/volta/releases/download/v${version}/${fileName}`;
}
async function getOpenSSLVersion(version = '') {
Expand Down Expand Up @@ -23022,7 +23040,7 @@ async function acquireVolta(version, options) {
// 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, options.variant);
const downloadUrl = await buildDownloadUrl(external_os_.platform(), external_os_.arch(), version, options.variant);
core.debug(`downloading from \`${downloadUrl}\``);
const downloadPath = await tool_cache.downloadTool(downloadUrl, undefined, options.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": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"private": true,
"description": "Setup volta for usage in your CI runs",
"keywords": [
Expand Down

0 comments on commit 979c865

Please sign in to comment.