summaryrefslogtreecommitdiff
path: root/buildscripts/bb.py
blob: 1e878283fed4652f86fba658426df2f05b6bfa00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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?" )