diff options
author | Richard Kreuter <richard@10gen.com> | 2010-02-03 13:51:05 -0500 |
---|---|---|
committer | Richard Kreuter <richard@10gen.com> | 2010-02-03 14:33:35 -0500 |
commit | 21aed2f0c17429ceeebf4821ca9d17ad1f954050 (patch) | |
tree | 85678e1e83f68caab918e97f1831626d43125b27 /buildscripts | |
parent | c609d245a5611db0df8517734b91a3b1cf2dfa3d (diff) | |
download | mongo-21aed2f0c17429ceeebf4821ca9d17ad1f954050.tar.gz |
Add Debian AMIs to makedist.py; implement stdafx frobbing in frob_version.py MINOR
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/frob_version.py | 35 | ||||
-rwxr-xr-x | buildscripts/makedist.py | 6 |
2 files changed, 21 insertions, 20 deletions
diff --git a/buildscripts/frob_version.py b/buildscripts/frob_version.py index 119ba7e9609..30f9e97b016 100755 --- a/buildscripts/frob_version.py +++ b/buildscripts/frob_version.py @@ -37,24 +37,20 @@ def frob_rpm_spec(version): o.write(line) os.rename(o.name, fname) -## I (RMK) don't yet know what-all cares about the versionString -## inside the mongo code, so I'm not actually doing this yet. - -# def frob_stdafx_cpp(version): -# fname = 'stdafx.cpp' -# with opentemp(fname) as o: -# with open(fname) as i: -# frobbed = False -# for line in i: -# if frobbed: -# o.write(line) -# else: -# if re.search(r'const.*char.*versionString\[\]', line): -# pass -# # FIXME: implement -# else: -# o.write(line) -# os.rename(o.name, fname) +def frob_stdafx_cpp(version): + fname = 'stdafx.cpp' + with opentemp(fname) as o: + with open(fname) as i: + frobbed = False + for line in i: + if frobbed: + o.write(line) + else: + if re.search(r'const.*char.*versionString\[\].*=', line): + o.write(' const char versionString[] = "%s";' version) + else: + o.write(line) + os.rename(o.name, fname) (progname, version) = sys.argv if version is None: @@ -62,3 +58,6 @@ if version is None: sys.exit(1) frob_debian_changelog(version) frob_rpm_spec(version) +## I don't yet know what-all cares about the versionString inside the +## mongo code, so I'm not actually calling this yet. +# frob_stdafx_cpp(version) diff --git a/buildscripts/makedist.py b/buildscripts/makedist.py index abe44498155..cc03da61615 100755 --- a/buildscripts/makedist.py +++ b/buildscripts/makedist.py @@ -165,6 +165,8 @@ rpm -Uvh /usr/src/redhat/RPMS/$ARCH/js-devel-1.70-8.x86_64.rpm (("ubuntu", "9.10", "x86"), "ami-bb709dd2"), (("ubuntu", "9.04", "x86_64"), "ami-eef61587"), (("ubuntu", "9.04", "x86"), "ami-ccf615a5"), + (("debian", "5.0", "x86"), "ami-dcf615b5"), + (("debian", "5.0", "x86_64"), "ami-f0f61599"), (("centos", "5.4", "x86"), "ami-f8b35e91"), (("centos", "5.4", "x86_64"), "ami-ccb35ea5"), (("fedora", "8", "x86_64"), "ami-2547a34c"), @@ -552,8 +554,8 @@ def processArguments(): raise SimpleError("this shouldn't happen: non-option returned from getopt()") if "help" in kwargs: - print "Usage: %s [OPTIONS] distro distro-version architecture mongo-version" % sys.argv[0] - print """Build some packages on new EC2 AMI instances. + print "Usage: %s [OPTIONS] DIRECTORY DISTRO DISTRO-VERSION ARCHITECTURE MONGO-VERSION" % sys.argv[0] + print """Build some packages on new EC2 AMI instances, leave packages under DIRECTORY. Options:""" for t in flagspec: print "%-20s\t%s." % ("-%s, --%s%s:" % (t[0], t[1], ("="+t[4]) if t[4] else ""), t[3]) |