packaging_rake_tasks 1.4.8 → 1.4.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/packaging/git_helpers.rb +5 -4
- data/lib/tasks/build_dependencies.rake +3 -1
- data/lib/tasks/check_changelog.rake +2 -0
- data/lib/tasks/check_license.rake +3 -3
- data/lib/tasks/osc.rake +2 -1
- data/lib/tasks/tarball.rake +14 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '059259f817d554fce29ebcb0edd1b37514644bd605322ec6b74183618330c8ae'
|
4
|
+
data.tar.gz: d088cc1ab6e04f6cd50023139ddedcda07c148eb0a3002009b1a166cfa7f430c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966f38193b4f25996858052867e0e24b5b75542f32d25e648fec74b7b82053683f0f004c18bfb53e3a47e835b80ccc62f53a5f3322d6a8ab9d9a9018532d967a
|
7
|
+
data.tar.gz: 3a890f6ee3d46236e7354ed0f483e9a6315cd0de3e03b66e1f27c9ce53861d5ff4a6fe36570eb73580ecb035bbd586fa5cc50cc76cbb2539c112b39db12f30ed
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.13
|
@@ -49,15 +49,16 @@ module Packaging
|
|
49
49
|
git("tag").include?(name)
|
50
50
|
end
|
51
51
|
|
52
|
-
# Read the package version from
|
53
|
-
# subdirectory.
|
52
|
+
# Read the package version from specfile_name. If specfile_name is 'nil',
|
53
|
+
# use the first .spec file in the packages/ subdirectory.
|
54
54
|
#
|
55
55
|
# @return String
|
56
56
|
#
|
57
|
-
def spec_version
|
57
|
+
def spec_version(specfile_name = nil)
|
58
|
+
specfile_name ||= Dir.glob("#{Packaging::Configuration.instance.package_dir}/*.spec").first
|
58
59
|
# use the first *.spec file found, assume all spec files
|
59
60
|
# contain the same version
|
60
|
-
File.readlines(
|
61
|
+
File.readlines(specfile_name)
|
61
62
|
.grep(/^\s*Version:\s*/).first.sub("Version:", "").strip
|
62
63
|
end
|
63
64
|
|
@@ -54,7 +54,9 @@ namespace :build_dependencies do
|
|
54
54
|
if escaped_list.empty?
|
55
55
|
puts "Nothing to install, *.spec file not found or no build dependencies defined"
|
56
56
|
else
|
57
|
-
|
57
|
+
sudo = Process.euid.zero? ? "" : "sudo"
|
58
|
+
interactive = $stdin.tty? ? "" : "--non-interactive"
|
59
|
+
cmd = "#{sudo} zypper #{interactive} install #{escaped_list}"
|
58
60
|
sh(cmd)
|
59
61
|
end
|
60
62
|
end
|
@@ -113,9 +113,9 @@ def license_report
|
|
113
113
|
if ! report[:missing].empty?
|
114
114
|
raise "\nMissing license:\n#{report[:missing].join("\n")}"
|
115
115
|
end
|
116
|
-
puts "\nSkipped files:\n#{report[:skipped].join("\n")}" if verbose
|
117
|
-
puts "\nCopyright found in these files:\n#{report[:seen].join("\n")}" if verbose
|
118
|
-
puts "\nCopyright detected as not needed in these files:\n#{report[:unneeded].join("\n")}" if verbose
|
116
|
+
puts "\nSkipped files:\n#{report[:skipped].join("\n")}" if verbose == true
|
117
|
+
puts "\nCopyright found in these files:\n#{report[:seen].join("\n")}" if verbose == true
|
118
|
+
puts "\nCopyright detected as not needed in these files:\n#{report[:unneeded].join("\n")}" if verbose == true
|
119
119
|
puts "\nAll files have proper license reference." if verbose
|
120
120
|
end
|
121
121
|
|
data/lib/tasks/osc.rake
CHANGED
@@ -52,7 +52,8 @@ namespace :osc do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def checkout
|
55
|
-
|
55
|
+
osc_verbose = (verbose == true) ? "--verbose" : ""
|
56
|
+
sh "osc -A '#{obs_api}' --traceback #{osc_verbose} checkout '#{obs_project}' #{package_name}"
|
56
57
|
end
|
57
58
|
|
58
59
|
def osc_checkout_dir
|
data/lib/tasks/tarball.rake
CHANGED
@@ -36,8 +36,10 @@ def remove_old_packages
|
|
36
36
|
# remove the old tarball - all versions
|
37
37
|
config = Packaging::Configuration.instance
|
38
38
|
package_glob = File.join(Dir.pwd,config.package_dir,"#{config.package_name}-*.tar.bz2")
|
39
|
-
|
40
|
-
|
39
|
+
verbose(verbose == true) do
|
40
|
+
Dir[package_glob].each do |d|
|
41
|
+
rm d
|
42
|
+
end
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
@@ -88,10 +90,17 @@ task :tarball do
|
|
88
90
|
config = Packaging::Configuration.instance
|
89
91
|
target = File.join(config.package_dir, package_file_name)
|
90
92
|
begin
|
91
|
-
|
92
|
-
|
93
|
+
puts "* Making tarball #{package_file_path} ..." if verbose
|
94
|
+
# collapse the middle state to false to silence FileUtils
|
95
|
+
verbose(verbose == true) do
|
96
|
+
Rake::Task[target].invoke
|
97
|
+
build_tarball
|
98
|
+
end
|
99
|
+
puts "* ...Done" if verbose
|
93
100
|
ensure
|
94
|
-
|
101
|
+
verbose(verbose == true) do
|
102
|
+
rm_rf target
|
103
|
+
end
|
95
104
|
end
|
96
105
|
end
|
97
106
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging_rake_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.7.
|
70
|
+
rubygems_version: 2.7.6.2
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Rake tasks providing tasks to package project in git and integration with
|