Created
April 5, 2015 11:38
-
-
Save antillean/7bb75d64cefa021a2fdc to your computer and use it in GitHub Desktop.
Adds and commits all files, printing the output of each command. The noteworthy thing here is the second command, which has to be executed as an array rather than a String.
This file contains hidden or 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
#!/usr/bin/env groovy | |
def process = "git add .".execute() | |
println process.text | |
// This next one has to be done as an array because of the space in the -am argument. | |
process = ["git", "commit", "-am 'First commit'"].execute() | |
println process.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment