From b9ee39b810aae10da83534776028585309b53a24 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 30 Jun 2014 19:23:23 +0000 Subject: builder: add --force-dirty flag Besides being good for development, it seems to be a necessity in case we are checked out as a submodule --- (limited to 'scripts') diff --git a/scripts/builder/main.py b/scripts/builder/main.py index ecdbf6a..47e10a0 100755 --- a/scripts/builder/main.py +++ b/scripts/builder/main.py @@ -88,7 +88,7 @@ def build (settings, repository): frontends = [] if repository.areTherePendingChanges(): - if 'install' in settings['versions']: + if 'install' in settings['versions'] and not settings['forcedirty']: raise Exception("repository has pending changes, can't 'install'") else: print "\nWARNING: repository has pending changes\n" @@ -150,6 +150,9 @@ def main (): sys.path.append(os.path.join(scriptDir(), 'frontends')) currentRepository = repository.repositoryWithPath(projectBaseDir()) + settings['forcedirty'] = len(parameters) + parameters = list(itertools.ifilter(lambda x: not x=='--force-dirty', parameters)) + settings['forcedirty'] = len(parameters)==settings['forcedirty'] clean() versions = list(itertools.takewhile(lambda x: not x.startswith('--'), parameters)) settings['versions'] = versions; #['debug', 'install', 'development', 'checksum'] -- cgit v0.9.0.2