Last active
August 29, 2015 14:16
-
-
Save raine/14c63c0848deaa3145e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by LiveScript 1.3.1 | |
var cliTail; | |
cliTail = async(function*(jobName, buildNumber, follow){ | |
var output; | |
output = yield tail(jobName, buildNumber, follow); | |
output.cata({ | |
Just: function(output){ | |
return output.pipe(formatTailOutput()).pipe(process.stdout).on('end', process.exit); | |
}, | |
Nothing: function(){ | |
var str; | |
str = "unable to find job"; | |
return console.log((function(){ | |
switch (false) { | |
case buildNumber == null: | |
return str + " or build: " + jobName + " [#" + buildNumber + "]"; | |
default: | |
return str + ": " + jobName; | |
} | |
}())); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cli-tail = async (job-name, build-number, follow) ->* | |
output = yield tail job-name, build-number, follow | |
output.cata do | |
Just: (output) -> | |
output | |
.pipe format-tail-output! | |
.pipe process.stdout | |
.on \end process.exit | |
Nothing: -> | |
str = "unable to find job" | |
console.log switch | |
| build-number? => "#str or build: #job-name [##{build-number}]" | |
| otherwise => "#str: #job-name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment