0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

Merge SConstruct changes

This commit is contained in:
Aaron 2009-01-27 13:22:57 -05:00
commit 2fdd4eb9fe
3 changed files with 33 additions and 1 deletions

2
.gitignore vendored
View File

@ -15,12 +15,14 @@
*.pch
*.jsh
*.jsall
*.pyc
db/Debug
db/oplog*
db/.gdb*
db/makefile.local
config.log
settings.py
#temp dirs
dump

View File

@ -5,6 +5,7 @@
# then just type scons
import os
import sys
# --- options ----
AddOption('--prefix',
@ -315,6 +316,8 @@ env.Program( "mongogrid" , commonFiles + coreDbFiles + Glob( "dbgrid/*.cpp" ) )
env.Library( "mongoclient" , allClientFiles )
env.Library( "mongotestfiles" , commonFiles + coreDbFiles + serverOnlyFiles )
env.Alias( "all" , [ "mongod" , "mongo" , "mongodump" , "mongoimport" ] )
# examples
clientEnv.Program( "firstExample" , [ "client/examples/first.cpp" ] )
clientEnv.Program( "secondExample" , [ "client/examples/second.cpp" ] )
@ -425,3 +428,30 @@ def gitPush( env, target, source ):
return subprocess.call( [ "git", "push" ] )
env.Alias( "push", [ ".", "smoke", "checkSource" ], gitPush )
env.AlwaysBuild( "push" )
# ---- deploying ---
def s3push( localName , remoteName=None , remotePrefix="-latest" ):
sys.path.append( "." )
import simples3
import settings
s = simples3.S3Bucket( "mongodb" , settings.id , settings.key )
un = os.uname()
if remoteName is None:
remoteName = localName
name = remoteName + "-" + un[0] + "-" + un[4] + remotePrefix
name = name.lower()
s.put( name , open( localName ).read() , acl="public-read" );
print( "uploaded " + localName + " to http://s3.amazonaws.com/" + s.name + "/" + name )
def s3shellpush( env , target , source ):
s3push( "mongo" , "mongo-shell" )
env.Alias( "s3shell" , [ "mongo" ] , [ s3shellpush ] )
env.AlwaysBuild( "s3shell" )

View File

@ -470,7 +470,7 @@ namespace mongo {
virtual void checkResponse( const char *data, int nReturned );
};
/* Use this class to connect to a replica pair of servers. The class will manage
/** Use this class to connect to a replica pair of servers. The class will manage
checking for which server in a replica pair is master, and do failover automatically.
On a failover situation, expect at least one operation to return an error (throw