mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 19:16:54 +08:00
Compare commits
2 Commits
releases/v
...
v1.1.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b756489b | ||
|
|
aced07b9c9 |
12
dist/index.js
vendored
12
dist/index.js
vendored
@@ -3777,8 +3777,20 @@ const installer = __importStar(__webpack_require__(749));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
// Inputs
|
||||
const versionInput = core.getInput('version');
|
||||
const arch = core.getInput('arch');
|
||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||
// while the strategy matrix only contains a key `${{ matrix.version }}`.
|
||||
// In that case, we want the action to fail, rather than trying to download julia from an URL that's missing parts and 404ing.
|
||||
// We _could_ fall back to the default but that means that builds silently do things differently than they're meant to, which
|
||||
// is worse than failing the build.
|
||||
if (!versionInput) {
|
||||
throw new Error('Version input must not be null');
|
||||
}
|
||||
if (!arch) {
|
||||
throw new Error(`Arch input must not be null`);
|
||||
}
|
||||
const availableReleases = installer.juliaVersions;
|
||||
const version = installer.getJuliaVersion(availableReleases, versionInput);
|
||||
core.debug(`selected Julia version: ${arch}/${version}`);
|
||||
|
||||
12
lib/setup-julia.js
generated
12
lib/setup-julia.js
generated
@@ -23,8 +23,20 @@ const installer = __importStar(require("./installer"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
// Inputs
|
||||
const versionInput = core.getInput('version');
|
||||
const arch = core.getInput('arch');
|
||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||
// while the strategy matrix only contains a key `${{ matrix.version }}`.
|
||||
// In that case, we want the action to fail, rather than trying to download julia from an URL that's missing parts and 404ing.
|
||||
// We _could_ fall back to the default but that means that builds silently do things differently than they're meant to, which
|
||||
// is worse than failing the build.
|
||||
if (!versionInput) {
|
||||
throw new Error('Version input must not be null');
|
||||
}
|
||||
if (!arch) {
|
||||
throw new Error(`Arch input must not be null`);
|
||||
}
|
||||
const availableReleases = installer.juliaVersions;
|
||||
const version = installer.getJuliaVersion(availableReleases, versionInput);
|
||||
core.debug(`selected Julia version: ${arch}/${version}`);
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "1.1.10",
|
||||
"version": "1.1.11",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-julia",
|
||||
"version": "1.1.10",
|
||||
"version": "1.1.11",
|
||||
"private": true,
|
||||
"description": "setup Julia action",
|
||||
"main": "lib/setup-julia.js",
|
||||
|
||||
@@ -8,8 +8,22 @@ import * as installer from './installer'
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
// Inputs
|
||||
const versionInput = core.getInput('version')
|
||||
const arch = core.getInput('arch')
|
||||
|
||||
// It can easily happen that, for example, a workflow file contains an input `version: ${{ matrix.julia-version }}`
|
||||
// while the strategy matrix only contains a key `${{ matrix.version }}`.
|
||||
// In that case, we want the action to fail, rather than trying to download julia from an URL that's missing parts and 404ing.
|
||||
// We _could_ fall back to the default but that means that builds silently do things differently than they're meant to, which
|
||||
// is worse than failing the build.
|
||||
if (!versionInput) {
|
||||
throw new Error('Version input must not be null')
|
||||
}
|
||||
if (!arch) {
|
||||
throw new Error(`Arch input must not be null`)
|
||||
}
|
||||
|
||||
const availableReleases = installer.juliaVersions
|
||||
const version = installer.getJuliaVersion(availableReleases, versionInput)
|
||||
core.debug(`selected Julia version: ${arch}/${version}`)
|
||||
|
||||
Reference in New Issue
Block a user