1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-05 20:46:20 +01:00
HLMetaModOfficial/support/buildbot/Versioning
2013-11-18 10:18:30 -08:00

34 lines
839 B
Python

# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
import os, sys
builder.SetBuildFolder('/')
includes = builder.AddFolder('includes')
argv = [
sys.executable,
os.path.join(builder.sourcePath, 'support', 'buildbot', 'generate_headers.py'),
os.path.join(builder.sourcePath),
os.path.join(builder.buildPath, 'includes')
]
outputs = [
os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h')
]
sources = [
os.path.join(builder.sourcePath, 'product.version'),
# This is a hack, but we need some way to only run this script when HG changes.
os.path.join(builder.sourcePath, '.hg', 'dirstate'),
# The script source is a dependency, of course...
argv[1]
]
cmd_node, output_nodes = builder.AddCommand(
inputs=sources,
argv=argv,
outputs=outputs
)
rvalue = output_nodes