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 +4 -4
- data/VERSION +1 -1
- data/lib/packaging/configuration.rb +3 -0
- data/lib/tasks/osc.rake +9 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2720c7b02ce51ba6de5843ff0aa418ea73a1c60b
|
4
|
+
data.tar.gz: dbb09cb7c3d24afa892a491604240b07a67e3e87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e78d31e447f145ca3ff789f2ee7c97f0f2baec10c123d964425987e00cf62e3b33febd0b534f539c57f1b8fab4e18445bc7646f4b0a08e2347a7e57ddc69f5
|
7
|
+
data.tar.gz: 359ddd0f6dc08a092c6ba0678fff25bf2509f6b39126c3e5b3c7ade704df44ab9c5b7e8860b7e2fedd2f4a306c4a3e5e7756a721901486c86dfd0397a771bc37
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
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
|
data/lib/tasks/osc.rake
CHANGED
@@ -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
|
-
|
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
|
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-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|