Rename to setup-beam (#21)

86521d7 · Bryan Paxton · 2021-03-29 19:51

15 files +116 -119

Files changed

modified CONTRIBUTING.md
+3 −3
@@ -1,8 +1,8 @@
1 1 ## Contributing
2 2
3 −[fork]: https://github.com/erlef/setup-elixir/fork
4 −[pr]: https://github.com/erlef/setup-elixir/compare
5 −[code-of-conduct]: https://github.com/erlef/setup-elixir/blob/main/CODE_OF_CONDUCT.md
3 +[fork]: https://github.com/erlef/setup-beam/fork
4 +[pr]: https://github.com/erlef/setup-beam/compare
5 +[code-of-conduct]: https://github.com/erlef/setup-beam/blob/main/CODE_OF_CONDUCT.md
6 6
7 7 Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
8 8
modified README.md
+6 −6
@@ -1,7 +1,7 @@
1 −# setup-elixir
1 +# setup-beam
2 2
3 −[![](https://github.com/erlef/setup-elixir/workflows/Test/badge.svg)](https://github.com/erlef/setup-elixir/actions)
4 −[![](https://github.com/erlef/setup-elixir/workflows/Licensed/badge.svg)](https://github.com/erlef/setup-elixir/actions)
3 +[![](https://github.com/erlef/setup-beam/workflows/Test/badge.svg)](https://github.com/erlef/setup-beam/actions)
4 +[![](https://github.com/erlef/setup-beam/workflows/Licensed/badge.svg)](https://github.com/erlef/setup-beam/actions)
5 5
6 6 This action sets up an Elixir environment for use in a GitHub Actions
7 7 workflow by:
@@ -39,7 +39,7 @@ jobs:
39 39 runs-on: ubuntu-latest
40 40 steps:
41 41 - uses: actions/checkout@v2
42 − - uses: erlef/setup-elixir@v1
42 + - uses: erlef/setup-beam@v1
43 43 with:
44 44 otp-version: '22.2'
45 45 elixir-version: '1.9.4'
@@ -62,7 +62,7 @@ jobs:
62 62 elixir: ['1.8.2', '1.9.4']
63 63 steps:
64 64 - uses: actions/checkout@v2
65 − - uses: erlef/setup-elixir@v1
65 + - uses: erlef/setup-beam@v1
66 66 with:
67 67 otp-version: ${{matrix.otp}}
68 68 elixir-version: ${{matrix.elixir}}
@@ -93,7 +93,7 @@ jobs:
93 93
94 94 steps:
95 95 - uses: actions/checkout@v2
96 − - uses: erlef/setup-elixir@v1
96 + - uses: erlef/setup-beam@v1
97 97 with:
98 98 otp-version: '22.2'
99 99 elixir-version: '1.9.4'
renamed __tests__/setup-elixir.test.js → __tests__/setup-beam.test.js
+1 −1
@@ -1,4 +1,4 @@
1 −const {getElixirVersion} = require('../src/setup-elixir')
1 +const {getElixirVersion} = require('../src/setup-beam')
2 2 const {deepStrictEqual} = require('assert')
3 3
4 4 async function test() {
modified dist/index.js
+86 −88
@@ -34,7 +34,7 @@ module.exports =
34 34 /******/ // the startup function
35 35 /******/ function startup() {
36 36 /******/ // Load entry module and return exports
37 −/******/ return __webpack_require__(986);
37 +/******/ return __webpack_require__(562);
38 38 /******/ };
39 39 /******/
40 40 /******/ // run startup
@@ -2931,7 +2931,7 @@ function escapeProperty(s) {
2931 2931 /***/ 449:
2932 2932 /***/ (function(module, __unusedexports, __webpack_require__) {
2933 2933
2934 −const {exec} = __webpack_require__(917)
2934 +const {exec} = __webpack_require__(986)
2935 2935 const path = __webpack_require__(622)
2936 2936 const semver = __webpack_require__(280)
2937 2937
@@ -2961,7 +2961,7 @@ async function installOTP(version, osVersion) {
2961 2961 return
2962 2962 }
2963 2963
2964 − throw new Error('@erlef/setup-elixir only supports Ubuntu Linux at this time')
2964 + throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
2965 2965 }
2966 2966
2967 2967
@@ -3212,90 +3212,11 @@ exports.getState = getState;
3212 3212
3213 3213 /***/ }),
3214 3214
3215 −/***/ 614:
3216 −/***/ (function(module) {
3217 −
3218 −module.exports = require("events");
3219 −
3220 −/***/ }),
3221 −
3222 −/***/ 622:
3223 −/***/ (function(module) {
3224 −
3225 −module.exports = require("path");
3226 −
3227 −/***/ }),
3228 −
3229 −/***/ 669:
3230 −/***/ (function(module) {
3231 −
3232 −module.exports = require("util");
3233 −
3234 −/***/ }),
3235 −
3236 −/***/ 747:
3237 −/***/ (function(module) {
3238 −
3239 −module.exports = require("fs");
3240 −
3241 −/***/ }),
3242 −
3243 −/***/ 917:
3244 −/***/ (function(__unusedmodule, exports, __webpack_require__) {
3245 −
3246 −"use strict";
3247 −
3248 −var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3249 − function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3250 − return new (P || (P = Promise))(function (resolve, reject) {
3251 − function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3252 − function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3253 − function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3254 − step((generator = generator.apply(thisArg, _arguments || [])).next());
3255 − });
3256 −};
3257 −var __importStar = (this && this.__importStar) || function (mod) {
3258 − if (mod && mod.__esModule) return mod;
3259 − var result = {};
3260 − if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
3261 − result["default"] = mod;
3262 − return result;
3263 −};
3264 −Object.defineProperty(exports, "__esModule", { value: true });
3265 −const tr = __importStar(__webpack_require__(9));
3266 −/**
3267 − * Exec a command.
3268 − * Output will be streamed to the live console.
3269 − * Returns promise with return code
3270 − *
3271 − * @param commandLine command to execute (can include additional args). Must be correctly escaped.
3272 − * @param args optional arguments for tool. Escaping is handled by the lib.
3273 − * @param options optional exec options. See ExecOptions
3274 − * @returns Promise<number> exit code
3275 − */
3276 −function exec(commandLine, args, options) {
3277 − return __awaiter(this, void 0, void 0, function* () {
3278 − const commandArgs = tr.argStringToArray(commandLine);
3279 − if (commandArgs.length === 0) {
3280 − throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
3281 − }
3282 − // Path to tool to execute should be first arg
3283 − const toolPath = commandArgs[0];
3284 − args = commandArgs.slice(1).concat(args || []);
3285 − const runner = new tr.ToolRunner(toolPath, args, options);
3286 − return runner.exec();
3287 − });
3288 −}
3289 −exports.exec = exec;
3290 −//# sourceMappingURL=exec.js.map
3291 −
3292 −/***/ }),
3293 −
3294 −/***/ 986:
3215 +/***/ 562:
3295 3216 /***/ (function(__unusedmodule, exports, __webpack_require__) {
3296 3217
3297 3218 const core = __webpack_require__(470)
3298 −const {exec} = __webpack_require__(917)
3219 +const {exec} = __webpack_require__(986)
3299 3220 const {installElixir, installOTP} = __webpack_require__(449)
3300 3221 const path = __webpack_require__(622)
3301 3222 const semver = __webpack_require__(280)
@@ -3335,7 +3256,7 @@ async function main() {
3335 3256 await installElixir(elixirVersion, otpMajor)
3336 3257 console.log(`##[endgroup]`)
3337 3258
3338 − process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-elixir/elixir/bin:${process.env.RUNNER_TEMP}/.setup-elixir/otp/bin:${process.env.PATH}`
3259 + process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin:${process.env.RUNNER_TEMP}/.setup-beam/otp/bin:${process.env.PATH}`
3339 3260
3340 3261 if (installRebar === 'true') await exec('mix local.rebar --force')
3341 3262 if (installHex === 'true') await exec('mix local.hex --force')
@@ -3349,9 +3270,7 @@ async function main() {
3349 3270
3350 3271 function checkPlatform() {
3351 3272 if (process.platform !== 'linux')
3352 − throw new Error(
3353 − '@erlef/setup-elixir only supports Ubuntu Linux at this time'
3354 − )
3273 + throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
3355 3274 }
3356 3275
3357 3276 async function getOtpVersion(spec, osVersion) {
@@ -3469,6 +3388,85 @@ function get(url) {
3469 3388 }
3470 3389
3471 3390
3391 +/***/ }),
3392 +
3393 +/***/ 614:
3394 +/***/ (function(module) {
3395 +
3396 +module.exports = require("events");
3397 +
3398 +/***/ }),
3399 +
3400 +/***/ 622:
3401 +/***/ (function(module) {
3402 +
3403 +module.exports = require("path");
3404 +
3405 +/***/ }),
3406 +
3407 +/***/ 669:
3408 +/***/ (function(module) {
3409 +
3410 +module.exports = require("util");
3411 +
3412 +/***/ }),
3413 +
3414 +/***/ 747:
3415 +/***/ (function(module) {
3416 +
3417 +module.exports = require("fs");
3418 +
3419 +/***/ }),
3420 +
3421 +/***/ 986:
3422 +/***/ (function(__unusedmodule, exports, __webpack_require__) {
3423 +
3424 +"use strict";
3425 +
3426 +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3427 + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3428 + return new (P || (P = Promise))(function (resolve, reject) {
3429 + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3430 + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3431 + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3432 + step((generator = generator.apply(thisArg, _arguments || [])).next());
3433 + });
3434 +};
3435 +var __importStar = (this && this.__importStar) || function (mod) {
3436 + if (mod && mod.__esModule) return mod;
3437 + var result = {};
3438 + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
3439 + result["default"] = mod;
3440 + return result;
3441 +};
3442 +Object.defineProperty(exports, "__esModule", { value: true });
3443 +const tr = __importStar(__webpack_require__(9));
3444 +/**
3445 + * Exec a command.
3446 + * Output will be streamed to the live console.
3447 + * Returns promise with return code
3448 + *
3449 + * @param commandLine command to execute (can include additional args). Must be correctly escaped.
3450 + * @param args optional arguments for tool. Escaping is handled by the lib.
3451 + * @param options optional exec options. See ExecOptions
3452 + * @returns Promise<number> exit code
3453 + */
3454 +function exec(commandLine, args, options) {
3455 + return __awaiter(this, void 0, void 0, function* () {
3456 + const commandArgs = tr.argStringToArray(commandLine);
3457 + if (commandArgs.length === 0) {
3458 + throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
3459 + }
3460 + // Path to tool to execute should be first arg
3461 + const toolPath = commandArgs[0];
3462 + args = commandArgs.slice(1).concat(args || []);
3463 + const runner = new tr.ToolRunner(toolPath, args, options);
3464 + return runner.exec();
3465 + });
3466 +}
3467 +exports.exec = exec;
3468 +//# sourceMappingURL=exec.js.map
3469 +
3472 3470 /***/ })
3473 3471
3474 3472 /******/ });
modified dist/install-elixir
+2 −2
@@ -5,6 +5,6 @@ set -eo pipefail
5 5 cd $RUNNER_TEMP
6 6
7 7 wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip
8 −unzip -d .setup-elixir/elixir ${1}${2}.zip
8 +unzip -d .setup-beam/elixir ${1}${2}.zip
9 9 rm ${1}${2}.zip
10 −echo "$(pwd)/.setup-elixir/elixir/bin" >> $GITHUB_PATH
10 +echo "$(pwd)/.setup-beam/elixir/bin" >> $GITHUB_PATH
modified dist/install-otp
+4 −4

Click to load diff…

modified package-lock.json
+3 −2

Click to load diff…

modified package.json
+2 −2

Click to load diff…

modified src/install-elixir
+2 −2

Click to load diff…

modified src/install-otp
+4 −4

Click to load diff…

modified src/installer.js
+1 −1

Click to load diff…

renamed src/setup-elixir.js → src/setup-beam.js
+2 −4

Click to load diff…

Parents: 885971a