~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to buildscripts/bb.py

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# bb tools
 
2
 
 
3
import os
 
4
import re
 
5
 
 
6
def checkOk():
 
7
    dir = os.getcwd()
 
8
    m = re.compile( ".*/.*_V(\d+\.\d+)/mongo" ).findall( dir )
 
9
    if len(m) == 0:
 
10
        return
 
11
    if len(m) > 1:
 
12
        raise Exception( "unexpected: " + str(m) )
 
13
    
 
14
    m = "v" + m[0]
 
15
    print( m )
 
16
    print( "excpted version [" + m + "]" )
 
17
 
 
18
    from subprocess import Popen, PIPE
 
19
    diff = Popen( [ "git", "diff", "origin/v1.2" ], stdout=PIPE ).communicate()[ 0 ]
 
20
    if len(diff) > 0:
 
21
        print( diff )
 
22
        raise Exception( "build bot broken?" )
 
23