Exemplo n.º 1
0
 def process(self):
     '''if the path doesn't exist in the _build dir then
     make it'''
     if not os.path.exists(self.build_path()):
         feedback.header(
                 '[creating folder] %s' % self.name)
         os.makedirs(self.build_path())
Exemplo n.º 2
0
 def process(self):
     '''render the file out'''
     feedback.header(
             '[rendering] %s/%s' % (
                 self.branch.name,
                 self.filename))
     render(self.src_path(), self.build_path())
Exemplo n.º 3
0
 def process(self):
     '''move to the build folder'''
     feedback.header(
             '[copying] %s/%s' % (
                 self.branch.name,
                 self.filename))
     shutil.copyfile(self.src_path(), self.build_path())
Exemplo n.º 4
0
 def has_changed(self):
     checksum = self.checksum()
     if self.last_known_checksum != checksum:
         feedback.header(
             '[changed] %s/%s' % (
                 self.branch.name,
                 self.filename))
         self.last_known_checksum = checksum
         return True
     return False