summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-02-10 21:37:18 -0500
committerEliot Horowitz <eliot@10gen.com>2009-02-10 21:37:18 -0500
commitcb5a1e178210ea639dc1755ab930de91229380d2 (patch)
tree5b06436ddc8f59dee2ec5e381286611c4277bde0
parent9cc79db5518123e239e3de3b8d82cab960b0d603 (diff)
downloadmongo-cb5a1e178210ea639dc1755ab930de91229380d2.tar.gz
distname
-rw-r--r--SConstruct30
1 files changed, 27 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index c6006d459d8..3b433a6471b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -7,6 +7,7 @@
# some common tasks
# build 64-bit mac and pushing to s3
# scons --64 s3dist
+# scons --distname=0.8 s3dist
# all s3 pushes require settings.py
import os
@@ -23,6 +24,15 @@ AddOption('--prefix',
metavar='DIR',
help='installation prefix')
+AddOption('--distname',
+ dest='distname',
+ type='string',
+ nargs=1,
+ action='store',
+ metavar='DIR',
+ help='dist name (0.8.0)')
+
+
AddOption( "--64",
dest="force64",
type="string",
@@ -153,6 +163,8 @@ DEFAULT_INSTALl_DIR = "/usr/local"
installDir = DEFAULT_INSTALl_DIR
nixLibPrefix = "lib"
+distName = GetOption( "distname" )
+
javaHome = GetOption( "javaHome" )
javaVersion = "i386";
javaLibs = []
@@ -580,7 +592,11 @@ testEnv.AlwaysBuild( "smokeClient" )
if distBuild:
from datetime import date
today = date.today()
- installDir = "mongo-db-" + platform + "-" + processor + "-" + today.strftime( "%Y-%m-%d" )
+ installDir = "mongo-db-" + platform + "-" + processor + "-";
+ if distName is None:
+ installDir += today.strftime( "%Y-%m-%d" )
+ else:
+ installDir += distName
print "going to make dist: " + installDir
# binaries
@@ -643,7 +659,14 @@ env.AlwaysBuild( "push" )
# ---- deploying ---
-def s3push( localName , remoteName=None , remotePrefix="-latest" , fixName=True , platformDir=True ):
+def s3push( localName , remoteName=None , remotePrefix=None , fixName=True , platformDir=True ):
+
+ if remotePrefix is None:
+ if distName is None:
+ remotePrefix = "-latest"
+ else:
+ remotePrefix = "-" + distName
+
sys.path.append( "." )
import simples3
@@ -666,8 +689,9 @@ def s3push( localName , remoteName=None , remotePrefix="-latest" , fixName=True
if platformDir:
name = platform + "/" + name
+ print( "uploading " + localName + " to http://s3.amazonaws.com/" + s.name + "/" + name )
s.put( name , open( localName , "rb" ).read() , acl="public-read" );
- print( "uploaded " + localName + " to http://s3.amazonaws.com/" + s.name + "/" + name )
+ print( " done uploading!" )
def s3shellpush( env , target , source ):
s3push( "mongo" , "mongo-shell" )