mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
Fix scons dist_clean
This commit is contained in:
parent
2479794acd
commit
e885029b8f
15
SConstruct
15
SConstruct
@ -1206,3 +1206,18 @@ Export("darwin windows solaris linux nix")
|
||||
|
||||
env.SConscript( 'src/SConscript', variant_dir=variantDir, duplicate=False )
|
||||
env.SConscript( 'SConscript.smoke' )
|
||||
|
||||
def clean_old_dist_builds(env, target, source):
|
||||
prefix = "mongodb-%s-%s" % (platform, processor)
|
||||
filenames = sorted(os.listdir("."))
|
||||
filenames = [x for x in filenames if x.startswith(prefix)]
|
||||
to_keep = [x for x in filenames if x.endswith(".tgz") or x.endswith(".zip")][-2:]
|
||||
for filename in [x for x in filenames if x not in to_keep]:
|
||||
print "removing %s" % filename
|
||||
try:
|
||||
shutil.rmtree(filename)
|
||||
except:
|
||||
os.remove(filename)
|
||||
|
||||
env.Alias("dist_clean", [], [clean_old_dist_builds])
|
||||
env.AlwaysBuild("dist_clean")
|
||||
|
@ -527,21 +527,6 @@ env.Alias( "install", "$INSTALL_DIR" )
|
||||
# aliases
|
||||
env.Alias( "mongoclient", '#/%s' % ( has_option( "sharedclient" ) and sharedClientLibName or clientLibName ) )
|
||||
|
||||
def clean_old_dist_builds(env, target, source):
|
||||
prefix = "mongodb-%s-%s" % (platform, processor)
|
||||
filenames = sorted(os.listdir("."))
|
||||
filenames = [x for x in filenames if x.startswith(prefix)]
|
||||
to_keep = [x for x in filenames if x.endswith(".tgz") or x.endswith(".zip")][-2:]
|
||||
for filename in [x for x in filenames if x not in to_keep]:
|
||||
print "removing %s" % filename
|
||||
try:
|
||||
shutil.rmtree(filename)
|
||||
except:
|
||||
os.remove(filename)
|
||||
|
||||
env.Alias("dist_clean", [], [clean_old_dist_builds])
|
||||
env.AlwaysBuild("dist_clean")
|
||||
|
||||
# client dist
|
||||
def build_and_test_client(env, target, source):
|
||||
from subprocess import call
|
||||
|
Loading…
Reference in New Issue
Block a user