mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
Don't show versioninfo() by default (#25)
* Only show versioninfo() in debug mode * Add input to specify if versioninfo() is displayed * No access to secrets
This commit is contained in:
@@ -9,6 +9,10 @@ inputs:
|
|||||||
description: 'Architecture of the Julia binaries. Defaults to x64.'
|
description: 'Architecture of the Julia binaries. Defaults to x64.'
|
||||||
required: false
|
required: false
|
||||||
default: 'x64'
|
default: 'x64'
|
||||||
|
show-versioninfo:
|
||||||
|
description: 'Display InteractiveUtils.versioninfo() after installing'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'lib/setup-julia.js'
|
main: 'lib/setup-julia.js'
|
||||||
|
|||||||
8
lib/setup-julia.js
generated
8
lib/setup-julia.js
generated
@@ -43,8 +43,12 @@ function run() {
|
|||||||
}
|
}
|
||||||
// Add it to PATH
|
// Add it to PATH
|
||||||
core.addPath(path.join(juliaPath, 'bin'));
|
core.addPath(path.join(juliaPath, 'bin'));
|
||||||
// Test if Julia has been installed by showing versioninfo()
|
// Test if Julia has been installed
|
||||||
yield exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
exec.exec('julia', ['--version']);
|
||||||
|
// If enabled, also show the full version info
|
||||||
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
@@ -32,8 +32,13 @@ async function run() {
|
|||||||
// Add it to PATH
|
// Add it to PATH
|
||||||
core.addPath(path.join(juliaPath, 'bin'))
|
core.addPath(path.join(juliaPath, 'bin'))
|
||||||
|
|
||||||
// Test if Julia has been installed by showing versioninfo()
|
// Test if Julia has been installed
|
||||||
await exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
|
exec.exec('julia', ['--version'])
|
||||||
|
|
||||||
|
// If enabled, also show the full version info
|
||||||
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user