1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# -*- coding: utf-8 -*-
# make continuous integration using rubygem-packaging_rake_tasks
# Copyright © 2015 SUSE
# MIT license
require "packaging/tasks"
require "packaging/configuration"
# skip 'tarball' task, it's redefined here
Packaging::Tasks.load_tasks(:exclude => ["tarball.rake", "check_changelog.rake"])
require "yast/tasks"
yast_submit = ENV.fetch("YAST_SUBMIT", "factory").to_sym
Yast::Tasks.submit_to(yast_submit)
Packaging.configuration do |conf|
conf.package_name.sub!(/-.*/, "") # strip branch name
conf.package_dir = ".obsdir" # Makefile.ci puts it there
conf.skip_license_check << /.*/
# defined in Rakefile in https://github.com/openSUSE/packaging_rake_tasks
if yast_submit == :factory
# Override values from
# https://github.com/yast/yast-rake/blob/master/data/targets.yml
# loaded by Yast::Tasks.submit_to() for OBS:
# filesystems:snapper/snapper
conf.obs_api = "https://api.opensuse.org/"
conf.obs_project = "filesystems:snapper"
conf.obs_sr_project = "openSUSE:Factory"
conf.obs_target = "openSUSE_Factory"
end
end
desc 'Show configuration'
task :show_config do
Packaging.configuration do |conf|
puts "API: #{conf.obs_api}"
puts "Project: #{conf.obs_project}"
puts "SR Project: #{conf.obs_sr_project}"
puts "Target: #{conf.obs_target}"
end
end
desc 'Pretend to run the test suite'
task :test do
puts 'No tests yet' if verbose
end
desc 'Build a tarball for OBS'
task :tarball do
sh "make -f Makefile.ci package"
end
# the "check:changelog" task is required by the "osc:sr" task
namespace "check" do
task :changelog do
# do nothing, we do not require a bugzilla/fate number for new changelog entries
end
end
|