20 lines
291 B
Groovy
20 lines
291 B
Groovy
#!/usr/bin/env groovy
|
|
|
|
import groovy.transform.Field
|
|
|
|
@Field
|
|
Map defaults = [
|
|
buildCmd: 'make all'
|
|
]
|
|
|
|
|
|
def call(Map config = [:]) {
|
|
assert config.artifacts : 'must specify artifacts!'
|
|
|
|
config = defaults + config
|
|
if ( fileExists(config.buildCmd)) {
|
|
sh 'make'
|
|
}
|
|
|
|
}
|