1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

build: Do not put a .distversion file into the GIT tree

This places the file only in the tarball, and shows how to
auto-generate other files for placement in the tarball.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2012-08-18 21:25:30 +10:00
parent 7a59c3d9b8
commit 921b927d30

15
wscript
View File

@ -6,7 +6,7 @@ blddir = 'bin'
APPNAME='samba'
VERSION=None
import sys, os
import sys, os, tempfile
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
import wafsamba, Options, samba_dist, Scripting, Utils, samba_version
@ -245,15 +245,18 @@ def dist():
if sambaversion.IS_SNAPSHOT:
# write .distversion file and add to tar
f = '.distversion'
distversionf = open(f, 'w')
distversionf = tempfile.NamedTemporaryFile(mode='w', prefix='.distversion',dir=blddir)
for field in sambaversion.vcs_fields:
distveroption = field + '=' + str(sambaversion.vcs_fields[field])
distversionf.write(distveroption + '\n')
distversionf.close()
samba_dist.DIST_FILES('.distversion')
distversionf.flush()
samba_dist.DIST_FILES('%s:.distversion' % distversionf.name)
samba_dist.dist()
distversionf.close()
else:
samba_dist.dist()
samba_dist.dist()
def distcheck():
'''test that distribution tarball builds and installs'''