Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IT1901
course-material
Commits
97f72c94
Commit
97f72c94
authored
5 years ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
added skeleton for the "pdfSlides" gradle task that will perform the
actual export
#8
parent
eddda401
No related branches found
No related tags found
No related merge requests found
Pipeline
#53197
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/build.gradle
+26
-7
26 additions, 7 deletions
lectures/build.gradle
with
26 additions
and
7 deletions
lectures/build.gradle
+
26
−
7
View file @
97f72c94
...
@@ -114,11 +114,13 @@ revealjsPlugins {
...
@@ -114,11 +114,13 @@ revealjsPlugins {
import
org.apache.tools.ant.taskdefs.condition.Os
import
org.apache.tools.ant.taskdefs.condition.Os
def
dockerAvailable
;
task
checkDocker
{
task
checkDocker
{
doLast
{
doLast
{
def
result
=
1
def
result
=
1
if
(
Os
.
isFamily
(
Os
.
FAMILY_WINDOWS
))
{
if
(
Os
.
isFamily
(
Os
.
FAMILY_WINDOWS
))
{
println
"
*** WINDOWS
"
println
"
windows os
"
result
=
exec
{
result
=
exec
{
def
command
=
"/c docker --version"
def
command
=
"/c docker --version"
ignoreExitValue
=
true
ignoreExitValue
=
true
...
@@ -126,20 +128,37 @@ task checkDocker {
...
@@ -126,20 +128,37 @@ task checkDocker {
}
}
}
else
{
}
else
{
//we assume linux/mac with bash if not having windows -
//more fine tuned testing can be done if needed
println
"linux / unix os"
result
=
exec
{
result
=
exec
{
def
command
=
"command -v docker"
def
command
=
"command -v docker"
ignoreExitValue
=
true
ignoreExitValue
=
true
executable
"bash"
args
"-l"
,
"-c"
,
command
executable
"bash"
args
"-l"
,
"-c"
,
command
}
}
}
}
if
(
result
.
getExitValue
()==
0
){
if
(
result
.
getExitValue
()==
0
){
println
"Has Docker"
println
"docker available"
dockerAvailable
=
true
}
else
{
}
else
{
print
"No Docker"
print
"no docker available"
dockerAvailable
=
false
}
}
}
}
}
}
build
.
dependsOn
'asciidoctorRevealJs'
task
pdfSlides
{
if
(
dockerAvailable
){
if
(
Os
.
isFamily
(
Os
.
FAMILY_WINDOWS
))
{
println
"run windows script"
}
else
{
println
"run linux / unix script"
}
}
else
{
println
"docker is not available on this machine"
}
}
build
.
dependsOn
'asciidoctorRevealJs'
pdfSlides
.
dependsOn
'checkDocker'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment