def create_watch(self): args = {} args['debian_name'] = self.debian_name args['dversionmangle'] = 's/\+(debian|dfsg|ds|deb)(\.\d+)?$//' args['url'] = self.upstream_repo_url args['module'] = self.name try: if self.upstream_repo_url.find('github') >= 0: content = utils.get_watch('github') % args else: # if not supported, got to fakeupstream raise ValueError utils.create_debian_file('watch', content) # test watch with uscan, raise exception if status is not 0 info = _getstatusoutput( 'uscan --watchfile "debian/watch" ' '--package "{}" ' '--upstream-version 0 --no-download'.format(self.debian_name)) if info[0] != 0: raise ValueError except ValueError: content = utils.get_watch('fakeupstream') % args utils.create_debian_file('watch', content)
def create_watch(self): args = {} args['debian_name'] = self.debian_name args['dversionmangle'] = 's/\+(debian|dfsg|ds|deb)(\.\d+)?$//' args['url'] = self.upstream_repo_url args['module'] = self.name try: if self.upstream_repo_url.find('github') >= 0: content = utils.get_watch('github') % args else: # if not supported, got to fakeupstream raise ValueError utils.create_debian_file('watch', content) # test watch with uscan, raise exception if status is not 0 info = _getstatusoutput('uscan --watchfile "debian/watch" ' '--package "{}" ' '--upstream-version 0 --no-download' .format(self.debian_name)) if info[0] != 0: raise ValueError except ValueError: content = utils.get_watch('fakeupstream') % args utils.create_debian_file('watch', content)
def create_watch(self): args = {} args['debian_name'] = self.debian_name args['dversionmangle'] = 'auto' args['url'] = self.upstream_repo_url args['module'] = self.name args['remodule'] = _re.sub(r'\@', r'\@', self.name) args['modulename'] = _re.sub(r'.*/', r'', self.name) try: if self.upstream_repo_url.find('github') >= 0: utils.debug(1, 'Found GitHub url') content = utils.get_watch('github') % args elif self.upstream_repo_url.find('gitlab') >= 0: utils.debug(1, 'Found GitLab url') content = utils.get_watch('gitlab') % args else: # if not supported, got to npmregistry raise ValueError utils.create_debian_file('watch', content) # test watch with uscan, raise exception if status is not 0 uscan_info = self.test_uscan() if uscan_info[0] != 0: utils.debug(1, 'Uscan failed, switching to npmregistry') raise ValueError except ValueError: self.upstream_watch = True content = utils.get_watch('npmregistry') % args utils.create_debian_file('watch', content)
def create_watch(self): args = {} args['debian_name'] = self.debian_name args['dversionmangle'] = 's/\+(debian|dfsg|ds|deb)(\.\d+)?$//' args['url'] = self.upstream_repo_url args['module'] = self.name try: if self.upstream_repo_url.find('github') >= 0: content = utils.get_watch('github') % args else: # if not supported, got to fakeupstream raise ValueError utils.create_debian_file('watch', content) # test watch with uscan, raise exception if status is not 0 uscan_info = self.test_uscan() if uscan_info[0] != 0: raise ValueError except ValueError: self.upstream_watch = True content = utils.get_watch('fakeupstream') % args utils.create_debian_file('watch', content)