Diffstat (limited to 'scripts/builder/frontendBuilder.py') (more/less context) (ignore whitespace changes)
-rw-r--r-- | scripts/builder/frontendBuilder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/builder/frontendBuilder.py b/scripts/builder/frontendBuilder.py index b796438..55054ee 100644 --- a/scripts/builder/frontendBuilder.py +++ b/scripts/builder/frontendBuilder.py | |||
@@ -1,49 +1,49 @@ | |||
1 | #!/usr/bin/python | 1 | #!/usr/bin/env python |
2 | # -*- coding: UTF-8 -*- | 2 | # -*- coding: UTF-8 -*- |
3 | 3 | ||
4 | import sys, os, re | 4 | import sys, os, re |
5 | import cssmin | 5 | import cssmin |
6 | import jsmin | 6 | import jsmin |
7 | import codecs | 7 | import codecs |
8 | import shutil | 8 | import shutil |
9 | import StringIO | 9 | import StringIO |
10 | import urllib | 10 | import urllib |
11 | 11 | ||
12 | #from mercurial import ui, hg | 12 | #from mercurial import ui, hg |
13 | #from mercurial.node import hex | 13 | #from mercurial.node import hex |
14 | from dulwich.repo import Repo | 14 | from dulwich.repo import Repo |
15 | 15 | ||
16 | import main | 16 | import main |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | class FrontendBuilder: | 20 | class FrontendBuilder: |
21 | 21 | ||
22 | def __init__ (self, frontend, settings): | 22 | def __init__ (self, frontend, settings): |
23 | if '.' in frontend: | 23 | if '.' in frontend: |
24 | moduleComponents = frontend.split('.') | 24 | moduleComponents = frontend.split('.') |
25 | self.module = moduleComponents[0] | 25 | self.module = moduleComponents[0] |
26 | self.submodule = moduleComponents[1] | 26 | self.submodule = moduleComponents[1] |
27 | else: | 27 | else: |
28 | self.module = frontend | 28 | self.module = frontend |
29 | self.submodule = frontend | 29 | self.submodule = frontend |
30 | 30 | ||
31 | self.settings = settings | 31 | self.settings = settings |
32 | self.projectDir = main.projectBaseDir() | 32 | self.projectDir = main.projectBaseDir() |
33 | self.processedFiles = {} | 33 | self.processedFiles = {} |
34 | 34 | ||
35 | 35 | ||
36 | def mercurialRepositoryVersion (self): | 36 | def mercurialRepositoryVersion (self): |
37 | repo = hg.repository(ui.ui(), self.projectDir) | 37 | repo = hg.repository(ui.ui(), self.projectDir) |
38 | context = repo['tip'] | 38 | context = repo['tip'] |
39 | result = str(context) | 39 | result = str(context) |
40 | 40 | ||
41 | return result | 41 | return result |
42 | 42 | ||
43 | 43 | ||
44 | def gitRepositoryVersion (self): | 44 | def gitRepositoryVersion (self): |
45 | repo = Repo(self.projectDir) | 45 | repo = Repo(self.projectDir) |
46 | #if repo.is_dirty(): | 46 | #if repo.is_dirty(): |
47 | #print "WARNING: build run with dirty repository" | 47 | #print "WARNING: build run with dirty repository" |
48 | result = repo.refs['HEAD'] | 48 | result = repo.refs['HEAD'] |
49 | 49 | ||