support/buildbot/Versioning
author David Anderson <dvander@alliedmods.net>
Mon Nov 18 09:46:46 2013 -0800 (2013-11-18)
changeset 870 004b1437bd14
parent 704 6055e296b807
child 874 7ff2546e4b65
permissions -rw-r--r--
Upgrade build scripts to AMBuild 2 (bug 5970, r=ds).
     1 # vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: 
     2 import os, sys
     3 
     4 builder.SetBuildFolder('/')
     5 
     6 includes = builder.AddFolder('includes')
     7 
     8 argv = [
     9   sys.executable,
    10   os.path.join(builder.sourcePath, 'support', 'buildbot', 'generate_headers.py'),
    11   os.path.join(builder.sourcePath),
    12   os.path.join(builder.buildPath, 'includes')
    13 ]
    14 outputs = [
    15   os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h')
    16 ]
    17 
    18 sources = [
    19   os.path.join(builder.sourcePath, 'product.version'),
    20 
    21   # This is a hack, but we need some way to only run this script when HG changes.
    22   os.path.join(builder.sourcePath, '.hg', 'dirstate'),
    23 ]
    24 cmd_node, output_nodes = builder.AddCommand(
    25   inputs=sources,
    26   argv=argv,
    27   outputs=outputs
    28 )
    29 
    30 rvalue = output_nodes