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:
Sascha Mann
2020-02-19 20:45:01 +01:00
committed by GitHub
parent eba5daa7a3
commit 83f4f82909
3 changed files with 17 additions and 4 deletions

View File

@@ -9,6 +9,10 @@ inputs:
description: 'Architecture of the Julia binaries. Defaults to x64.'
required: false
default: 'x64'
show-versioninfo:
description: 'Display InteractiveUtils.versioninfo() after installing'
required: false
default: 'false'
runs:
using: 'node12'
main: 'lib/setup-julia.js'

8
lib/setup-julia.js generated
View File

@@ -43,8 +43,12 @@ function run() {
}
// Add it to PATH
core.addPath(path.join(juliaPath, 'bin'));
// Test if Julia has been installed by showing versioninfo()
yield exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
// Test if Julia has been installed
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) {
core.setFailed(error.message);

View File

@@ -32,8 +32,13 @@ async function run() {
// Add it to PATH
core.addPath(path.join(juliaPath, 'bin'))
// Test if Julia has been installed by showing versioninfo()
await exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
// Test if Julia has been installed
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) {
core.setFailed(error.message)
}