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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47be5a27f65d9a027aa8fa4beea8f8abde96ab8a6edd71e3d51b685233535c21
4
- data.tar.gz: aab7e6292b15f7b192ea4662a2719cc9f405f133df9332ad31848c2a184a0da9
3
+ metadata.gz: '059259f817d554fce29ebcb0edd1b37514644bd605322ec6b74183618330c8ae'
4
+ data.tar.gz: d088cc1ab6e04f6cd50023139ddedcda07c148eb0a3002009b1a166cfa7f430c
5
5
  SHA512:
6
- metadata.gz: 2a11c5d4860ee72e8b97171c6a791557601b69e0a9fa80609c1906d4e169a5088164d2a9da636fb5a2448a4d6f161c0b15dc69c453a2161549aae19c62d145d8
7
- data.tar.gz: 6d6370b0738d43364a6bf41456fc1971171b646537b05032984bbfdfbb5469b1733135e059de9772b0b1f9884cdd51f37c6fa1043cc3210d4b594b3fb6a8ec50
6
+ metadata.gz: 966f38193b4f25996858052867e0e24b5b75542f32d25e648fec74b7b82053683f0f004c18bfb53e3a47e835b80ccc62f53a5f3322d6a8ab9d9a9018532d967a
7
+ data.tar.gz: 3a890f6ee3d46236e7354ed0f483e9a6315cd0de3e03b66e1f27c9ce53861d5ff4a6fe36570eb73580ecb035bbd586fa5cc50cc76cbb2539c112b39db12f30ed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.8
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 the first .spec file in the packages/
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(Dir.glob("package/*.spec").first)
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
- cmd = "sudo zypper install #{escaped_list}"
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
@@ -46,6 +46,8 @@ ID_MATCHERS = [
46
46
  /build#(\d+)/,
47
47
  /osc#(\d+)/,
48
48
  /jsc#([[:alpha:]]+\-\d+)/,
49
+ /lf#(\d+)/,
50
+ /(?:gh|github)#([a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}\/[\w.-]+#\d+)/i
49
51
  ]
50
52
 
51
53
  namespace "check" do
@@ -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
 
@@ -52,7 +52,8 @@ namespace :osc do
52
52
  end
53
53
 
54
54
  def checkout
55
- sh "osc -A '#{obs_api}' --traceback --verbose checkout '#{obs_project}' #{package_name}"
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
@@ -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
- Dir[package_glob].each do |d|
40
- rm d
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
- Rake::Task[target].invoke
92
- build_tarball
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
- rm_rf target
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.8
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: 2019-06-12 00:00:00.000000000 Z
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.3
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