from twisted.internet import defer
from buildbot.process import buildstep
+import re
+
c = BuildmasterConfig = {}
####### SECRETS
@defer.inlineCallbacks
def run(self):
cmd = yield self.makeRemoteShellCommand(
- command=["hledger","--version"])
+ collectStdout=True,
+ command=["hledger","--version"])
yield self.runCommand(cmd)
+
+ # record as property
+ match = re.search(r'[0-9]*\.[0-9]*',cmd.stdout)
+ if match:
+ hledger_version = match[0]
+ else:
+ hledger_version = ''
+ yield self.setProperty("hledger-version",hledger_version)
+
return cmd.results()
####### BUILDERS