Skip to content
Snippets Groups Projects
Commit 355247c6 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

Work done on the build script to check os and find out if docker is

available #8
parent 72403743
No related branches found
No related tags found
No related merge requests found
...@@ -112,4 +112,34 @@ revealjsPlugins { ...@@ -112,4 +112,34 @@ revealjsPlugins {
}*/ }*/
} }
import org.apache.tools.ant.taskdefs.condition.Os
task checkDocker {
doLast{
def result = 1
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
println "*** WINDOWS "
result = exec{
def command = " "
ignoreExitValue = true
executable "docker" args "--version"
}
}else{
result = exec{
def command = "command -v docker"
ignoreExitValue = true
executable "bash" args "-l", "-c", command
}
}
if(result.getExitValue()==0){
println "Has Docker"
}else{
print "No Docker"
}
}
}
build.dependsOn 'asciidoctorRevealJs' build.dependsOn 'asciidoctorRevealJs'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment