-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prep before publishing action #3
Changes from 1 commit
c1d37cf
916d784
79bf0e1
55dd0cd
4cbe40d
fbc12ad
201a704
018b228
e65a4da
e8161f5
2aeac78
3759c8d
fcccf1a
1a3bced
8838f51
a21d97f
dd0097a
58d28cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
|
||
const core = require('@actions/core'); | ||
const core = require('@actions/core'); | ||
//const github = require('@actions/github'); | ||
const semver = require('semver'); | ||
|
||
try { | ||
const since_perl = semver.coerce (core.getInput('since-perl')); | ||
const with_devel = core.getInput('with-devel') == "true"; | ||
const since_perl = semver.coerce(core.getInput('since-perl')); | ||
const with_devel = core.getInput('with-devel') == "true"; | ||
|
||
let available = [ | ||
"5.8", | ||
"5.10", "5.12", "5.14", "5.16", "5.18", | ||
"5.20", "5.22", "5.24", "5.26", "5.28", | ||
"5.30", "5.32", "5.34", "5.36", "5.38", | ||
"devel", | ||
]; | ||
let available = [ | ||
"5.8", | ||
"5.10", "5.12", "5.14", "5.16", "5.18", | ||
"5.20", "5.22", "5.24", "5.26", "5.28", | ||
"5.30", "5.32", "5.34", "5.36", "5.38", | ||
"devel", | ||
]; | ||
|
||
let filtered = available.filter ( | ||
(item) => { | ||
if (item == "devel") { return with_devel; } | ||
return semver.gte(semver.coerce(item), semver.coerce(since_perl)); | ||
} | ||
); | ||
let filtered = available.filter( | ||
(item) => { | ||
if (item == "devel") { | ||
return with_devel; | ||
} | ||
return semver.gte(semver.coerce(item), semver.coerce(since_perl)); | ||
} | ||
); | ||
|
||
console.log('perl-versions', JSON.stringify(filtered)); | ||
core.setOutput('perl-versions', JSON.stringify(filtered)); | ||
console.log('perl-versions', JSON.stringify(filtered)); | ||
core.setOutput('perl-versions', JSON.stringify(filtered)); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} | ||
core.setFailed(error.message); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please also configure tooling to enforce trailing newline There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same this is coming from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please retain indent with tabs. That is something I call "contributor friendly", allowing everyone to set their own tab width to whatever they want, letting tab representing "1 indent level"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added
pretty
and this is auto converted bynpm run pretty