Skip to content

Commit

Permalink
public: move git commit and branch private to libpublic
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jan 13, 2025
1 parent b097d57 commit fc5bb11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions public/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def options(opt):
def configure(conf):
# private to libpublic
conf.load('gitversion')
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'unknown-commit')
conf.define('XASH_BUILD_BRANCH', conf.env.GIT_BRANCH if conf.env.GIT_BRANCH else 'unknown-branch')
conf.env.VALIDATE_TARGET = conf.options.VALIDATE_TARGET

# need to expose it for everyone using libpublic headers
Expand Down Expand Up @@ -122,7 +120,8 @@ def build(bld):

bld.stlib(source = bld.path.ant_glob('*.c'),
target = 'public',
use = 'sdk_includes werror')
use = 'sdk_includes werror',
defines = ['XASH_BUILD_COMMIT=\"%s\"' % bld.env.GIT_VERSION, 'XASH_BUILD_BRANCH=\"%s\"' % bld.env.GIT_BRANCH])

if bld.env.TESTS:
if bld.env.VALIDATE_TARGET:
Expand Down

0 comments on commit fc5bb11

Please sign in to comment.