def get_section_path(self, section): file_path = functions.get_config_filepath( self._get_project_config_filepath(section), os.path.join(self.directory, self.filename)) if not os.path.exists(file_path): path = os.path.dirname(file_path) local('mkdir -p %s' % path) org = os.path.join(env.configs_dir, self.filename) local('cp %s %s' % (org, file_path)) return file_path
def get_section_path(self, section): file_path = functions.get_config_filepath( self._get_project_config_filepath(section), os.path.join(self.directory, self.filename) ) if not os.path.exists(file_path): path = os.path.dirname(file_path) local("mkdir -p %s" % path) org = os.path.join(env.configs_dir, self.filename) local("cp %s %s" % (org, file_path)) return file_path
def get_section_path(self, section): file_path = functions.get_config_filepath( self._get_project_config_filepath(section), DEFAULT_CONF_FILE ) if not os.path.exists(file_path): path = os.path.dirname(file_path) local('mkdir -p %s' % path) org = os.path.join(env.configs_dir, 'ipf.conf') local('cp %s %s' % (org, file_path)) return file_path
def run(self, hook=None): file_path = get_config_filepath(hook, DEFAULT_GIT_HOOK) path = os.path.join(env.git_repo_name, "hooks", "post-receive") put(file_path, path) run('chmod +x %s' % path)