summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-29 10:21:43 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-29 10:21:43 -0400
commit7dbf34c67ed1933a0958007fcd17001955f6f70d (patch)
tree936df219ce7e7ce705eb352b55ea92655906e58f
parente24e6f3cbec9fc057f02633dbae13a0640af53ee (diff)
downloadmongo-7dbf34c67ed1933a0958007fcd17001955f6f70d.tar.gz
if the version in the code is 'clean' then do a dist release for s3dist
-rw-r--r--SConstruct13
1 files changed, 11 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 129400807ab..013f94b67ee 100644
--- a/SConstruct
+++ b/SConstruct
@@ -241,6 +241,7 @@ installDir = DEFAULT_INSTALl_DIR
nixLibPrefix = "lib"
distName = GetOption( "distname" )
+dontReplacePackage = False
javaHome = GetOption( "javaHome" )
javaVersion = "i386";
@@ -1022,14 +1023,18 @@ def getCodeVersion():
def getDistName( sofar ):
global distName
-
+ global dontReplacePackage
+
if distName is not None:
return distName
if str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
version = getCodeVersion()
if not version.endswith( "+" ):
- print( "maybe a real version" )
+ print( "got real code version, doing release build for: " + version )
+ dontReplacePackage = True
+ distName = version
+ return version
return today.strftime( "%Y-%m-%d" )
@@ -1147,6 +1152,10 @@ def s3push( localName , remoteName=None , remotePrefix=None , fixName=True , pla
name = platform + "/" + name
print( "uploading " + localName + " to http://s3.amazonaws.com/" + s.name + "/" + name )
+ if dontReplacePackage:
+ for ( key , modify , etag , size ) in s.listdir( prefix=name ):
+ print( "error: already a file with that name, not uploading" )
+ Exit(2)
s.put( name , open( localName , "rb" ).read() , acl="public-read" );
print( " done uploading!" )