def main(self): BaseCliModule.main(self) build_dir = os.path.normpath(os.path.abspath(self.options.output_dir)) package_name = get_project_name(tag=self.options.tag) build_tag = None build_version = None # Determine which package version we should build: if self.options.tag: build_tag = self.options.tag build_version = build_tag[len(package_name + "-"):] else: build_version = get_latest_tagged_version(package_name) if build_version == None: error_out(["Unable to lookup latest package info.", "Perhaps you need to tag first?"]) build_tag = "%s-%s" % (package_name, build_version) if not self.options.test: check_tag_exists(build_tag, offline=self.options.offline) self.pkg_config = self._read_project_config(package_name, build_dir, self.options.tag, self.options.no_cleanup) builder = self._create_builder(package_name, build_tag, build_version, self.options, self.pkg_config, build_dir) builder.run(self.options)
def main(self, argv): BaseCliModule.main(self, argv) build_dir = os.path.normpath(os.path.abspath(self.options.output_dir)) package_name = get_project_name(tag=self.options.tag) build_tag = None build_version = None if self.options.release: error_out( "'tito build --release' is now deprecated. Please see 'tito release'." ) # Determine which package version we should build: if self.options.tag: build_tag = self.options.tag build_version = build_tag[len(package_name + "-"):] else: build_version = get_latest_tagged_version(package_name) if build_version == None: error_out([ "Unable to lookup latest package info.", "Perhaps you need to tag first?" ]) build_tag = "%s-%s" % (package_name, build_version) if not self.options.test: check_tag_exists(build_tag, offline=self.options.offline) self.pkg_config = self._read_project_config(package_name, build_dir, self.options.tag, self.options.no_cleanup) args = self._parse_builder_args() kwargs = { 'dist': self.options.dist, 'test': self.options.test, 'offline': self.options.offline, 'auto_install': self.options.auto_install, 'rpmbuild_options': self.options.rpmbuild_options, } builder = create_builder(package_name, build_tag, build_version, self.pkg_config, build_dir, self.global_config, self.user_config, args, builder_class=self.options.builder, **kwargs) return builder.run(self.options)
def main(self, argv): BaseCliModule.main(self, argv) build_dir = os.path.normpath(os.path.abspath(self.options.output_dir)) package_name = get_project_name(tag=self.options.tag) build_tag = None build_version = None if self.options.release: error_out("'tito build --release' is now deprecated. Please see 'tito release'.") # Determine which package version we should build: if self.options.tag: build_tag = self.options.tag build_version = build_tag[len(package_name + "-") :] else: build_version = get_latest_tagged_version(package_name) if build_version == None: error_out(["Unable to lookup latest package info.", "Perhaps you need to tag first?"]) build_tag = "%s-%s" % (package_name, build_version) if not self.options.test: check_tag_exists(build_tag, offline=self.options.offline) self.pkg_config = self._read_project_config(package_name, build_dir, self.options.tag, self.options.no_cleanup) args = self._parse_builder_args() kwargs = { "dist": self.options.dist, "test": self.options.test, "offline": self.options.offline, "auto_install": self.options.auto_install, "rpmbuild_options": self.options.rpmbuild_options, "scl": self.options.scl, } builder = create_builder( package_name, build_tag, build_version, self.pkg_config, build_dir, self.global_config, self.user_config, args, builder_class=self.options.builder, **kwargs ) return builder.run(self.options)