yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #05828
[Branch ~yade-dev/yade/trunk] Rev 2461: 1. Added initial scripts/build-fabric
------------------------------------------------------------
revno: 2461
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Wed 2010-10-06 15:51:14 +0200
message:
1. Added initial scripts/build-fabric
2. scripts/debian-prep now smoothly handles absenting DEBEMAIL and DBFULLNAME variables
added:
scripts/build-fabric
modified:
scripts/debian-prep
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== added file 'scripts/build-fabric'
--- scripts/build-fabric 1970-01-01 00:00:00 +0000
+++ scripts/build-fabric 2010-10-06 13:51:14 +0000
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# encoding: utf-8
+
+#Initial script to create build-bot
+import sys,os,numpy,shutil
+
+revNo = 2460
+distributivesNames = numpy.array(['lucid','maverick']) #Supported distributives
+distributivesArch = numpy.array(['x86_64','amd64']) #Supported achitectures
+
+defaultPath = sys.path[0] #Default Path for builds
+try:
+ if (sys.argv[1]): defaultPath = os.path.normpath(sys.argv[1])
+except IndexError:
+ pass
+
+
+if os.path.exists(defaultPath+'/cleanBzr'):
+ print "CleanBZR folder exists"
+ print "Updating to the latest bzr version"
+ os.chdir(defaultPath+'/cleanBzr/yade')
+ os.system('bzr up')
+ revNo=os.popen("LC_ALL=C bzr revno 2>/dev/null").readlines()[0][:-1]
+else:
+ os.mkdir(defaultPath+'/cleanBzr')
+ print "CleanBZR created"
+ print "Checking out the latest bzr version"
+ os.chdir(defaultPath+'/cleanBzr/')
+ os.system('bzr checkout lp:yade --lightweight')
+ os.chdir('yade')
+ revNo=os.popen("LC_ALL=C bzr revno 2>/dev/null").readlines()[0][:-1]
+
+
+os.chdir(defaultPath)
+
+for distrName in distributivesNames:
+ if os.path.exists(distrName) and (os.path.isdir(distrName)):
+ shutil.rmtree(distrName)
+ os.mkdir(distrName)
+ os.chdir(distrName)
+ for archName in distributivesArch:
+ os.mkdir(archName)
+ shutil.copytree('../cleanBzr/yade',archName+'/yade')
+ os.chdir(archName+'/yade')
+ os.system('scripts/debian-prep ' + distrName)
+ os.chdir('..')
+ os.rename('yade', 'yade-bzr'+str(revNo)+'-bzr'+str(revNo))
+ os.system('dpkg-source -b -I yade-bzr'+str(revNo)+'-bzr'+str(revNo))
+ os.chdir('..')
+ os.chdir('..')
=== modified file 'scripts/debian-prep'
--- scripts/debian-prep 2010-10-02 08:05:50 +0000
+++ scripts/debian-prep 2010-10-06 13:51:14 +0000
@@ -43,13 +43,16 @@
# package is yade-0.50, but with UPDATE .1, it is version 0.50.1
# write debian/changelog
-open('debian/changelog','w').write(
-'''yade-%s (%s%s-%s1) %s; urgency=low
-
- * Automatic debian changelog entry for yade-%s
-
- -- %s <%s> %s
-'''%(VERSION,VERSION,UPDATE,DISTRIBUTION,DISTRIBUTION,VERSION,os.environ['DEBFULLNAME'],os.environ['DEBEMAIL'],time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime())))
+try:
+ open('debian/changelog','w').write(
+ '''yade-%s (%s%s-%s1) %s; urgency=low
+
+ * Automatic debian changelog entry for yade-%s
+
+ -- %s <%s> %s
+ '''%(VERSION,VERSION,UPDATE,DISTRIBUTION,DISTRIBUTION,VERSION,os.environ['DEBFULLNAME'],os.environ['DEBEMAIL'],time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime())))
+except KeyError:
+ print "Please, set DEBEMAIL and DEBFULLNAME as described here http://www.debian.org/doc/maint-guide/ch-first.en.html"
# remove some generated files
for p in ('doc/doxygen','doc/sphinx/_build','tags'):