Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Lyons
pipeline
Commits
24cdc07d
Commit
24cdc07d
authored
Dec 17, 2017
by
Andrew Nicols
Browse files
Task: File vs fileExists
parent
3158d01e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/moodle/ci/Task.groovy
View file @
24cdc07d
...
...
@@ -74,9 +74,9 @@ class Task {
return
pathToRunner
}
else
if
(
moodleVersion
)
{
def
runner
=
"${script.env.HOME}/scripts/runner/${moodleVersion.name}/run.sh"
if
(!
fileExists
(
runner
))
{
runner
=
"${script.env.HOME}/scripts/runner/master/run.sh"
def
runner
=
new
File
(
"${script.env.HOME}/scripts/runner/${moodleVersion.name}/run.sh"
)
if
(!
runner
.
exists
(
))
{
runner
=
new
File
(
"${script.env.HOME}/scripts/runner/master/run.sh"
)
}
return
runner
...
...
@@ -85,10 +85,10 @@ class Task {
script:
'grep "\\$branch" moodle/version.php | sed "s/^[^\']*\'\\([^\']*\\).*\$/\\1/"'
,
returnStdout:
true
).
trim
()
def
runner
=
"${script.env.HOME}/scripts/runner/${versionName}/run.sh"
def
runner
=
new
File
(
"${script.env.HOME}/scripts/runner/${versionName}/run.sh"
)
if
(!
fileExists
(
runner
))
{
runner
=
"${script.env.HOME}/scripts/runner/master/run.sh"
if
(!
runner
.
exists
(
))
{
runner
=
new
File
(
"${script.env.HOME}/scripts/runner/master/run.sh"
)
}
return
runner
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment