yast-rake 0.2.3 → 0.2.4

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: 987f4cd3885cd4cfeffc8ffdcbd6dea09e239385
4
- data.tar.gz: e15456ac4b3f2efcd5bc842da7ece0af231a62d9
3
+ metadata.gz: ad29db6c3fec4ff4f526118043f9fd9bd912a335
4
+ data.tar.gz: 380575d560b88883b88d1b289ea9254979fb2fd1
5
5
  SHA512:
6
- metadata.gz: 10510fff5bdb332e5ed86bfa457d73a1372977204ceec9da0fb47a5be7315bfbc7e45997b68125507ff7cf3fccfd02698de37474333c09e76bce36c9252e2117
7
- data.tar.gz: ba9315a1341830700b547e32f1795b417cbc55b3f2c69bdaa9f830980c3bef901ac67880b7b104c565ec94e4f2416bba1b750863833e91fff09a17e9a431a248
6
+ metadata.gz: 115c90e10abf864c35c553e5621235b990d9c178b1412c7a0e3fc7271ed47cd443d02a19cb07c8db3fb611776fbe41b6a09cb59c0efa8a2d86f65237c4f96b80
7
+ data.tar.gz: d0fe2a211e1309fd32be3c8b91fcffefc451c9e9f3ecef6588a220324b1feaa0bddfc28230836b62ee8dfbbda1e92a36e8f6e02448cb207d6accb7a44de84059
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
data/data/targets.yml ADDED
@@ -0,0 +1,18 @@
1
+ :sle12:
2
+ obs_api: "https://api.suse.de/"
3
+ obs_project: "Devel:YaST:SLE-12"
4
+ obs_sr_project: "SUSE:SLE-12:Update"
5
+ obs_target: "SLE_12"
6
+ :leap_42_1:
7
+ obs_api: "https://api.opensuse.org"
8
+ obs_target: "openSUSE_Leap_42.1"
9
+ obs_sr_project: "openSUSE:Leap:42.1"
10
+ obs_project: "YaST:openSUSE:42.1"
11
+ :sle12sp1:
12
+ obs_api: "https://api.suse.de/"
13
+ obs_project: "Devel:YaST:Head"
14
+ obs_sr_project: "SUSE:SLE-12-SP1:GA"
15
+ obs_target: "SLE-12-SP1"
16
+ :factory:
17
+ obs_project: "YaST:Head"
18
+ obs_sr_project: "openSUSE:Factory"
data/lib/yast/rake.rb CHANGED
@@ -16,24 +16,7 @@
16
16
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
  #++
18
18
  require "packaging"
19
-
20
- # create wrapper to Packaging Configuration
21
- module Yast
22
- # Yast::Task module contains helper methods
23
- module Tasks
24
- def self.configuration(&block)
25
- ::Packaging.configuration(&block)
26
- end
27
-
28
- # read the version from spec file
29
- def self.spec_version
30
- # use the first *.spec file found, assume all spec files
31
- # contain the same version
32
- File.readlines(Dir.glob("package/*.spec").first)
33
- .grep(/^\s*Version:\s*/).first.sub("Version:", "").strip
34
- end
35
- end
36
- end
19
+ require_relative "tasks"
37
20
 
38
21
  # yast integration testing takes too long and require osc:build so it create
39
22
  # circle, so replace test dependency with test:unit
@@ -43,9 +26,10 @@ prerequisites.delete("test")
43
26
 
44
27
  task.enhance(prerequisites)
45
28
 
29
+ yast_submit = ENV["YAST_SUBMIT"] || :factory
30
+ Yast::Tasks.submit_to(yast_submit.to_sym)
31
+
46
32
  Yast::Tasks.configuration do |conf|
47
- conf.obs_project = "YaST:Head"
48
- conf.obs_sr_project = "openSUSE:Factory"
49
33
  conf.package_name = File.read("RPMNAME").strip if File.exist?("RPMNAME")
50
34
  conf.version = Yast::Tasks.spec_version if !Dir.glob("package/*.spec").empty?
51
35
  conf.skip_license_check << /spell.dict$/ # skip license check for spelling dictionaries
data/lib/yast/tasks.rb ADDED
@@ -0,0 +1,51 @@
1
+ #--
2
+ # Yast rake
3
+ #
4
+ # Copyright (C) 2009-2013 Novell, Inc.
5
+ # This library is free software; you can redistribute it and/or modify
6
+ # it only under the terms of version 2.1 of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation.
8
+ #
9
+ # This library is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
+ # details.
13
+ #
14
+ # You should have received a copy of the GNU Lesser General Public
15
+ # License along with this library; if not, write to the Free Software
16
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
+ #++
18
+
19
+ require "yaml"
20
+
21
+ # create wrapper to Packaging Configuration
22
+ module Yast
23
+ # Yast::Task module contains helper methods
24
+ module Tasks
25
+ # Targets definition
26
+ TARGETS_FILE = File.expand_path("../../../data/targets.yml", __FILE__)
27
+
28
+ def self.configuration(&block)
29
+ ::Packaging.configuration(&block)
30
+ end
31
+
32
+ # read the version from spec file
33
+ def self.spec_version
34
+ # use the first *.spec file found, assume all spec files
35
+ # contain the same version
36
+ File.readlines(Dir.glob("package/*.spec").first)
37
+ .grep(/^\s*Version:\s*/).first.sub("Version:", "").strip
38
+ end
39
+
40
+ def self.submit_to(target, file = TARGETS_FILE)
41
+ targets = YAML.load_file(file)
42
+ config = targets[target]
43
+ raise "Not configuration found for #{target}" if config.nil?
44
+ Yast::Tasks.configuration do |conf|
45
+ config.each do |meth, val|
46
+ conf.public_send("#{meth}=", val)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yast-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Reidinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -49,6 +49,7 @@ extra_rdoc_files: []
49
49
  files:
50
50
  - COPYING
51
51
  - VERSION
52
+ - data/targets.yml
52
53
  - lib/tasks/install.rake
53
54
  - lib/tasks/pot.rake
54
55
  - lib/tasks/run.rake
@@ -58,6 +59,7 @@ files:
58
59
  - lib/tasks/test_unit.rake
59
60
  - lib/tasks/version.rake
60
61
  - lib/yast/rake.rb
62
+ - lib/yast/tasks.rb
61
63
  homepage: http://github.org/openSUSE/yast-rake
62
64
  licenses:
63
65
  - LGPL v2.1
@@ -78,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
80
  version: '0'
79
81
  requirements: []
80
82
  rubyforge_project:
81
- rubygems_version: 2.2.2
83
+ rubygems_version: 2.4.5.1
82
84
  signing_key:
83
85
  specification_version: 4
84
86
  summary: Rake tasks providing basic work-flow for Yast development