Rename to setup-beam (#21)

This commit is contained in:
Bryan Paxton
2021-03-29 14:51:27 -05:00
committed by GitHub
parent 885971a72e
commit 86521d7b4d
12 changed files with 116 additions and 119 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
## Contributing ## Contributing
[fork]: https://github.com/erlef/setup-elixir/fork [fork]: https://github.com/erlef/setup-beam/fork
[pr]: https://github.com/erlef/setup-elixir/compare [pr]: https://github.com/erlef/setup-beam/compare
[code-of-conduct]: https://github.com/erlef/setup-elixir/blob/main/CODE_OF_CONDUCT.md [code-of-conduct]: https://github.com/erlef/setup-beam/blob/main/CODE_OF_CONDUCT.md
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
+6 -6
View File
@@ -1,7 +1,7 @@
# setup-elixir # setup-beam
[![](https://github.com/erlef/setup-elixir/workflows/Test/badge.svg)](https://github.com/erlef/setup-elixir/actions) [![](https://github.com/erlef/setup-beam/workflows/Test/badge.svg)](https://github.com/erlef/setup-beam/actions)
[![](https://github.com/erlef/setup-elixir/workflows/Licensed/badge.svg)](https://github.com/erlef/setup-elixir/actions) [![](https://github.com/erlef/setup-beam/workflows/Licensed/badge.svg)](https://github.com/erlef/setup-beam/actions)
This action sets up an Elixir environment for use in a GitHub Actions This action sets up an Elixir environment for use in a GitHub Actions
workflow by: workflow by:
@@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: '22.2' otp-version: '22.2'
elixir-version: '1.9.4' elixir-version: '1.9.4'
@@ -62,7 +62,7 @@ jobs:
elixir: ['1.8.2', '1.9.4'] elixir: ['1.8.2', '1.9.4']
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: ${{matrix.otp}} otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}} elixir-version: ${{matrix.elixir}}
@@ -93,7 +93,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: '22.2' otp-version: '22.2'
elixir-version: '1.9.4' elixir-version: '1.9.4'
@@ -1,4 +1,4 @@
const {getElixirVersion} = require('../src/setup-elixir') const {getElixirVersion} = require('../src/setup-beam')
const {deepStrictEqual} = require('assert') const {deepStrictEqual} = require('assert')
async function test() { async function test() {
+86 -88
View File
@@ -34,7 +34,7 @@ module.exports =
/******/ // the startup function /******/ // the startup function
/******/ function startup() { /******/ function startup() {
/******/ // Load entry module and return exports /******/ // Load entry module and return exports
/******/ return __webpack_require__(986); /******/ return __webpack_require__(562);
/******/ }; /******/ };
/******/ /******/
/******/ // run startup /******/ // run startup
@@ -2931,7 +2931,7 @@ function escapeProperty(s) {
/***/ 449: /***/ 449:
/***/ (function(module, __unusedexports, __webpack_require__) { /***/ (function(module, __unusedexports, __webpack_require__) {
const {exec} = __webpack_require__(917) const {exec} = __webpack_require__(986)
const path = __webpack_require__(622) const path = __webpack_require__(622)
const semver = __webpack_require__(280) const semver = __webpack_require__(280)
@@ -2961,7 +2961,7 @@ async function installOTP(version, osVersion) {
return return
} }
throw new Error('@erlef/setup-elixir only supports Ubuntu Linux at this time') throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
} }
@@ -3212,90 +3212,11 @@ exports.getState = getState;
/***/ }), /***/ }),
/***/ 614: /***/ 562:
/***/ (function(module) {
module.exports = require("events");
/***/ }),
/***/ 622:
/***/ (function(module) {
module.exports = require("path");
/***/ }),
/***/ 669:
/***/ (function(module) {
module.exports = require("util");
/***/ }),
/***/ 747:
/***/ (function(module) {
module.exports = require("fs");
/***/ }),
/***/ 917:
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const tr = __importStar(__webpack_require__(9));
/**
* Exec a command.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise<number> exit code
*/
function exec(commandLine, args, options) {
return __awaiter(this, void 0, void 0, function* () {
const commandArgs = tr.argStringToArray(commandLine);
if (commandArgs.length === 0) {
throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
}
// Path to tool to execute should be first arg
const toolPath = commandArgs[0];
args = commandArgs.slice(1).concat(args || []);
const runner = new tr.ToolRunner(toolPath, args, options);
return runner.exec();
});
}
exports.exec = exec;
//# sourceMappingURL=exec.js.map
/***/ }),
/***/ 986:
/***/ (function(__unusedmodule, exports, __webpack_require__) { /***/ (function(__unusedmodule, exports, __webpack_require__) {
const core = __webpack_require__(470) const core = __webpack_require__(470)
const {exec} = __webpack_require__(917) const {exec} = __webpack_require__(986)
const {installElixir, installOTP} = __webpack_require__(449) const {installElixir, installOTP} = __webpack_require__(449)
const path = __webpack_require__(622) const path = __webpack_require__(622)
const semver = __webpack_require__(280) const semver = __webpack_require__(280)
@@ -3335,7 +3256,7 @@ async function main() {
await installElixir(elixirVersion, otpMajor) await installElixir(elixirVersion, otpMajor)
console.log(`##[endgroup]`) console.log(`##[endgroup]`)
process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-elixir/elixir/bin:${process.env.RUNNER_TEMP}/.setup-elixir/otp/bin:${process.env.PATH}` process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin:${process.env.RUNNER_TEMP}/.setup-beam/otp/bin:${process.env.PATH}`
if (installRebar === 'true') await exec('mix local.rebar --force') if (installRebar === 'true') await exec('mix local.rebar --force')
if (installHex === 'true') await exec('mix local.hex --force') if (installHex === 'true') await exec('mix local.hex --force')
@@ -3349,9 +3270,7 @@ async function main() {
function checkPlatform() { function checkPlatform() {
if (process.platform !== 'linux') if (process.platform !== 'linux')
throw new Error( throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
'@erlef/setup-elixir only supports Ubuntu Linux at this time'
)
} }
async function getOtpVersion(spec, osVersion) { async function getOtpVersion(spec, osVersion) {
@@ -3469,6 +3388,85 @@ function get(url) {
} }
/***/ }),
/***/ 614:
/***/ (function(module) {
module.exports = require("events");
/***/ }),
/***/ 622:
/***/ (function(module) {
module.exports = require("path");
/***/ }),
/***/ 669:
/***/ (function(module) {
module.exports = require("util");
/***/ }),
/***/ 747:
/***/ (function(module) {
module.exports = require("fs");
/***/ }),
/***/ 986:
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const tr = __importStar(__webpack_require__(9));
/**
* Exec a command.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise<number> exit code
*/
function exec(commandLine, args, options) {
return __awaiter(this, void 0, void 0, function* () {
const commandArgs = tr.argStringToArray(commandLine);
if (commandArgs.length === 0) {
throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
}
// Path to tool to execute should be first arg
const toolPath = commandArgs[0];
args = commandArgs.slice(1).concat(args || []);
const runner = new tr.ToolRunner(toolPath, args, options);
return runner.exec();
});
}
exports.exec = exec;
//# sourceMappingURL=exec.js.map
/***/ }) /***/ })
/******/ }); /******/ });
+2 -2
View File
@@ -5,6 +5,6 @@ set -eo pipefail
cd $RUNNER_TEMP cd $RUNNER_TEMP
wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip
unzip -d .setup-elixir/elixir ${1}${2}.zip unzip -d .setup-beam/elixir ${1}${2}.zip
rm ${1}${2}.zip rm ${1}${2}.zip
echo "$(pwd)/.setup-elixir/elixir/bin" >> $GITHUB_PATH echo "$(pwd)/.setup-beam/elixir/bin" >> $GITHUB_PATH
+4 -4
View File
@@ -5,8 +5,8 @@ set -eo pipefail
cd $RUNNER_TEMP cd $RUNNER_TEMP
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/${2}/${1}.tar.gz wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/${2}/${1}.tar.gz
mkdir -p .setup-elixir/otp mkdir -p .setup-beam/otp
tar zxf otp.tar.gz -C .setup-elixir/otp --strip-components=1 tar zxf otp.tar.gz -C .setup-beam/otp --strip-components=1
rm otp.tar.gz rm otp.tar.gz
.setup-elixir/otp/Install -minimal $(pwd)/.setup-elixir/otp .setup-beam/otp/Install -minimal $(pwd)/.setup-beam/otp
echo "$(pwd)/.setup-elixir/otp/bin" >> $GITHUB_PATH echo "$(pwd)/.setup-beam/otp/bin" >> $GITHUB_PATH
+3 -2
View File
@@ -1,11 +1,12 @@
{ {
"name": "setup-elixir", "name": "setup-beam",
"version": "1.6.0", "version": "1.6.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "1.4.1", "name": "setup-beam",
"version": "1.6.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.0.0", "@actions/core": "^1.0.0",
+2 -2
View File
@@ -1,10 +1,10 @@
{ {
"name": "setup-elixir", "name": "setup-beam",
"version": "1.6.0", "version": "1.6.0",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "ncc build src/setup-elixir.js", "build": "ncc build src/setup-beam.js",
"format": "prettier \"src/**/*.js\"" "format": "prettier \"src/**/*.js\""
}, },
"husky": { "husky": {
+2 -2
View File
@@ -5,6 +5,6 @@ set -eo pipefail
cd $RUNNER_TEMP cd $RUNNER_TEMP
wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip
unzip -d .setup-elixir/elixir ${1}${2}.zip unzip -d .setup-beam/elixir ${1}${2}.zip
rm ${1}${2}.zip rm ${1}${2}.zip
echo "$(pwd)/.setup-elixir/elixir/bin" >> $GITHUB_PATH echo "$(pwd)/.setup-beam/elixir/bin" >> $GITHUB_PATH
+4 -4
View File
@@ -5,8 +5,8 @@ set -eo pipefail
cd $RUNNER_TEMP cd $RUNNER_TEMP
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/${2}/${1}.tar.gz wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/${2}/${1}.tar.gz
mkdir -p .setup-elixir/otp mkdir -p .setup-beam/otp
tar zxf otp.tar.gz -C .setup-elixir/otp --strip-components=1 tar zxf otp.tar.gz -C .setup-beam/otp --strip-components=1
rm otp.tar.gz rm otp.tar.gz
.setup-elixir/otp/Install -minimal $(pwd)/.setup-elixir/otp .setup-beam/otp/Install -minimal $(pwd)/.setup-beam/otp
echo "$(pwd)/.setup-elixir/otp/bin" >> $GITHUB_PATH echo "$(pwd)/.setup-beam/otp/bin" >> $GITHUB_PATH
+1 -1
View File
@@ -28,5 +28,5 @@ async function installOTP(version, osVersion) {
return return
} }
throw new Error('@erlef/setup-elixir only supports Ubuntu Linux at this time') throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
} }
+2 -4
View File
@@ -39,7 +39,7 @@ async function main() {
await installElixir(elixirVersion, otpMajor) await installElixir(elixirVersion, otpMajor)
console.log(`##[endgroup]`) console.log(`##[endgroup]`)
process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-elixir/elixir/bin:${process.env.RUNNER_TEMP}/.setup-elixir/otp/bin:${process.env.PATH}` process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin:${process.env.RUNNER_TEMP}/.setup-beam/otp/bin:${process.env.PATH}`
if (installRebar === 'true') await exec('mix local.rebar --force') if (installRebar === 'true') await exec('mix local.rebar --force')
if (installHex === 'true') await exec('mix local.hex --force') if (installHex === 'true') await exec('mix local.hex --force')
@@ -53,9 +53,7 @@ async function main() {
function checkPlatform() { function checkPlatform() {
if (process.platform !== 'linux') if (process.platform !== 'linux')
throw new Error( throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
'@erlef/setup-elixir only supports Ubuntu Linux at this time'
)
} }
async function getOtpVersion(spec, osVersion) { async function getOtpVersion(spec, osVersion) {