-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathRakefile
42 lines (35 loc) · 1.36 KB
/
Rakefile
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
# -*- coding: utf-8 -*-
# make continuous integration using rubygem-packaging_rake_tasks
# Copyright © 2016 SUSE
# MIT license
require "packaging/tasks"
require "packaging/configuration"
# skip 'tarball' task because it's redefined here and 'check:changelog' task
# because it makes no sense at this stage of the development
Packaging::Tasks.load_tasks(:exclude => ["tarball.rake", "check_changelog.rake"])
Rake::Task["package"].prerequisites.delete("check:changelog")
require "yast/tasks"
Yast::Tasks.submit_to(ENV.fetch("YAST_SUBMIT", "factory").to_sym)
Packaging.configuration do |conf|
conf.package_dir = ".obsdir" # Makefile.ci puts it there
# FIXME: we should not skip .c and .h files from the license check
conf.skip_license_check << /.*/
conf.package_name = "libstorage-ng"
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
task :update_package_location do
# read the spec file from "package" dir if ".obsdir" does not exist yet
if !File.exist?(".obsdir")
Packaging.configuration { |conf| conf.package_dir = "package" }
end
end
# update the "build_dependencies:*" tasks to read the alternative spec file
task :"build_dependencies:list" => :update_package_location
task :"build_dependencies:install" => :update_package_location