mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
try to protect from bad bb stuff
This commit is contained in:
parent
5f7ea78dae
commit
02a960c1d3
@ -19,6 +19,9 @@ import shutil
|
||||
import urllib
|
||||
import urllib2
|
||||
import buildscripts
|
||||
import buildscripts.bb
|
||||
|
||||
buildscripts.bb.checkOk()
|
||||
|
||||
# --- options ----
|
||||
AddOption('--prefix',
|
||||
|
23
buildscripts/bb.py
Normal file
23
buildscripts/bb.py
Normal file
@ -0,0 +1,23 @@
|
||||
# bb tools
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
def checkOk():
|
||||
dir = os.getcwd()
|
||||
m = re.compile( ".*/.*_V(\d+\.\d+)/mongo" ).findall( dir )
|
||||
if len(m) == 0:
|
||||
return
|
||||
if len(m) > 1:
|
||||
raise Exception( "unexpected: " + str(m) )
|
||||
|
||||
m = "v" + m[0]
|
||||
print( m )
|
||||
print( "excpted version [" + m + "]" )
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
diff = Popen( [ "git", "diff", "origin/v1.2" ], stdout=PIPE ).communicate()[ 0 ]
|
||||
if len(diff) > 0:
|
||||
print( diff )
|
||||
raise Exception( "build bot broken?" )
|
||||
|
Loading…
Reference in New Issue
Block a user