packaging_rake_tasks 1.0.15 → 1.1.0

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
  SHA1:
3
- metadata.gz: ac6294ef156ca9b0f0edf9b88e8de8137106b1de
4
- data.tar.gz: 1657708c8403017c717ce2f82d99a15a18681bd1
3
+ metadata.gz: 2720c7b02ce51ba6de5843ff0aa418ea73a1c60b
4
+ data.tar.gz: dbb09cb7c3d24afa892a491604240b07a67e3e87
5
5
  SHA512:
6
- metadata.gz: 5ba7e1c3772787d46b4299c79a10c6bab225cfadf351cd4020901da288e16cf511637333d14b43aaeea438e95e87739e10064895365422219f6a98d93bc99ef0
7
- data.tar.gz: 7127e2d2452f0e3ba40c7ea3c1d9925ec306ef8027fb188318335f2a75d7c064b26d714e768cfd7693f55b93b0d61046601a1c0904331e2fe225e167754bbfe3
6
+ metadata.gz: 76e78d31e447f145ca3ff789f2ee7c97f0f2baec10c123d964425987e00cf62e3b33febd0b534f539c57f1b8fab4e18445bc7646f4b0a08e2347a7e57ddc69f5
7
+ data.tar.gz: 359ddd0f6dc08a092c6ba0678fff25bf2509f6b39126c3e5b3c7ade704df44ab9c5b7e8860b7e2fedd2f4a306c4a3e5e7756a721901486c86dfd0397a771bc37
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.15
1
+ 1.1.0
@@ -29,6 +29,7 @@ module Packaging
29
29
  @obs_api = "https://api.opensuse.org/"
30
30
  @obs_target = "openSUSE_Factory"
31
31
  @skip_license_check = []
32
+ @maintenance_mode = false
32
33
  end
33
34
 
34
35
  #custom package name, by default directory name
@@ -55,6 +56,8 @@ module Packaging
55
56
  attr_accessor :obs_target
56
57
  # additional list of regex to skip license check
57
58
  attr_accessor :skip_license_check
59
+ # Specify if project is in maintenance mode. If so, then it create maintenance request instead of pull request
60
+ attr_accessor :maintenance_mode
58
61
 
59
62
  def package_name
60
63
  @package_name ||= Dir.pwd.split("/").last
@@ -69,7 +69,7 @@ namespace :osc do
69
69
  end
70
70
 
71
71
  Dir.chdir(osc_checkout_dir) do
72
- sh "osc addremove"
72
+ sh "osc -A '#{obs_api}' addremove"
73
73
  end
74
74
  end
75
75
 
@@ -97,7 +97,7 @@ namespace :osc do
97
97
  puts "building package..." if verbose
98
98
 
99
99
  # pipe yes to osc build to automatic rebuild broken build root if it happen
100
- command = "yes | osc build"
100
+ command = "yes | osc -A '#{obs_api}' build"
101
101
  command << " --no-verify" #ignore untrusted BS projects
102
102
  command << " --release=1" #have always same release number
103
103
  # have separated roots per target system, so sharing is more effficient
@@ -127,7 +127,7 @@ namespace :osc do
127
127
  # If a line starts with +, delete + and print it.
128
128
  # Except skip the added "-----" header and the timestamp-author after that,
129
129
  # and skip the +++ diff header
130
- changes = `osc diff *.changes | sed -n '/^+---/,+2b;/^+++/b;s/^+//;T;p'`.strip
130
+ changes = `osc -A '#{obs_api}' diff *.changes | sed -n '/^+---/,+2b;/^+++/b;s/^+//;T;p'`.strip
131
131
  if changes.empty?
132
132
  # %h is short hash of a commit
133
133
  git_ref = `git log --format=%h -n 1`.chomp
@@ -137,7 +137,7 @@ namespace :osc do
137
137
  # provide only reasonable amount of changes
138
138
  changes = changes.split("\n").take(MAX_CHANGES_LINES).join("\n")
139
139
 
140
- sh "osc", "commit", "-m", changes
140
+ sh "osc", "-A", obs_api, "commit", "-m", changes
141
141
  puts "New package submitted to #{obs_project}" if verbose
142
142
  end
143
143
  ensure
@@ -171,7 +171,11 @@ namespace :osc do
171
171
  desc "Create submit request from devel project to target project without any other packaging or checking"
172
172
  task :force do
173
173
  new_version = version_from_spec("#{package_dir}/#{package_name}.spec")
174
- sh "yes | osc -A '#{obs_api}' sr '#{obs_project}' '#{package_name}' '#{obs_sr_project}' -m 'submit new version #{new_version}' --yes"
174
+ if Packaging::Configuration.instance.maintenance_mode
175
+ sh "yes | osc -A '#{obs_api}' maintenancerequest --no-cleanup '#{obs_project}' '#{package_name}' '#{obs_sr_project}' -m 'submit new version #{new_version}'"
176
+ else
177
+ sh "yes | osc -A '#{obs_api}' submitreq --no-cleanup '#{obs_project}' '#{package_name}' '#{obs_sr_project}' -m 'submit new version #{new_version}' --yes"
178
+ end
175
179
  end
176
180
  end
177
181
  end
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.0.15
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Reidinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake