projects
/
mass-build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
forward python 2 configuration
[mass-build.git]
/
mass_build.py
diff --git
a/mass_build.py
b/mass_build.py
index 1c84070b3d918ed7de24fdc76c00af8d8dbfe651..11e519966e783aafea3ae3c357f8153d4e9ff604 100755
(executable)
--- a/
mass_build.py
+++ b/
mass_build.py
@@
-11,6
+11,9
@@
parser.add_argument("-c, --config",
parser.add_argument("--reconfigure",
action="store_true", dest="reconfigure",
help="Force configuration to be run")
parser.add_argument("--reconfigure",
action="store_true", dest="reconfigure",
help="Force configuration to be run")
+parser.add_argument("--reset-source",
+ action="store_true", dest="reset_source",
+ help="Reset sourcecode to the given version (removes local changes!)")
parser.add_argument("--no-update",
action="store_false", dest="update",
help="Do not update modules before compilation")
parser.add_argument("--no-update",
action="store_false", dest="update",
help="Do not update modules before compilation")
@@
-20,6
+23,9
@@
parser.add_argument("--resume-from", metavar='MODULE',
parser.add_argument("modules", metavar='MODULE', nargs='*',
help="Manually specify modules to be built")
args = parser.parse_args()
parser.add_argument("modules", metavar='MODULE', nargs='*',
help="Manually specify modules to be built")
args = parser.parse_args()
+# sanitize
+if args.reset_source and not args.update:
+ raise Exception("When no update is performed, no reset to the given version can be done either")
# load config
config = imp.load_source('config', args.config).__dict__
# load config
config = imp.load_source('config', args.config).__dict__
@@
-96,11
+102,11
@@
for project in workProjects:
try:
if args.update:
print "Updating module",project.sourceFolder()
try:
if args.update:
print "Updating module",project.sourceFolder()
- project.vcs.update()
+ project.vcs.update(
forceVersion=args.reset_source
)
print "Building module",project.sourceFolder()
project.buildSystem.build(reconfigure=args.reconfigure)
print
print "Building module",project.sourceFolder()
project.buildSystem.build(reconfigure=args.reconfigure)
print
- except (subprocess.CalledProcessError, KeyboardInterrupt) as e:
+ except (subprocess.CalledProcessError, KeyboardInterrupt) as e:
# for some exceptions, a stackrace is usually pointless
print >> sys.stderr
print >> sys.stderr
if isinstance(e, KeyboardInterrupt): # str(e) would be the empty string
print >> sys.stderr
print >> sys.stderr
if isinstance(e, KeyboardInterrupt): # str(e) would be the empty string