Getting output from Plastic SCM (Unity Version Control)
Tiny example of how to get some output from Plastic SCM client:
def output = bat script: "@ cm status --cset", returnStdout: true
// -> cs:123@rep:repository@server
output = output.trim()
def outputSplit = output.split('@')
// -> cs:123
def changeset = outputSplit.split(':')[-1]
// -> 123
Some highlights:
- Putting a @ before the command in a batch script will make the console not print the command itself
- [-1] means the last index in the array