simp-rake-helpers 5.4.1 → 5.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +9 -0
- data/README.md +10 -0
- data/lib/simp/componentinfo.rb +1 -2
- data/lib/simp/rake/build/rpmdeps.rb +0 -1
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/lib/simp/relchecks.rb +2 -3
- data/spec/lib/simp/componentinfo_spec.rb +1 -1
- data/spec/lib/simp/rake/build/rpmdeps_spec.rb +2 -2
- data/spec/lib/simp/relchecks_compare_latest_tag_spec.rb +17 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2c6ce6418a9a5502135d802a6a96f42ee4b3660f
|
4
|
+
data.tar.gz: 2b18c76399ef02e72ca986723cb24f41d2b69267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a66462436bec15a83457fa138effaa890773b7b8a681c1bee75d7c2901bc0426e1d0b37e64d417807072a62572d59de7450a82a51c69ca57b620315eac95d6a6
|
7
|
+
data.tar.gz: d45a422e9781164aa8df97f6542ff404a1d85284abecc1feff1c1d8f650d18bad155ba9289d8fc0b36ae6ab397c01847e30c6fa35c9feb3c00cbdf9141a97f19
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### 5.4.3 / 2018-03-29
|
2
|
+
* Fix RPM release processing when generating 'Obsoletes' metadata
|
3
|
+
|
4
|
+
### 5.4.2 / 2018-03-06
|
5
|
+
* Document requirement for double-digit day in CHANGELOG date.
|
6
|
+
* Add optional spec test for CHANGELOG file at `$SIMP_SPEC_changelog`
|
7
|
+
* Fix invalid `module_without_changelog` spec test for `Simp::RelChecks`
|
8
|
+
* `load_and_validate_changelog` now passes on `verbose` to `Simp::ComponentInfo`
|
9
|
+
|
1
10
|
### 5.4.1 / 2018-03-04
|
2
11
|
* Fix Travis CI deployment script
|
3
12
|
|
data/README.md
CHANGED
@@ -154,8 +154,18 @@ level of the project, if it exists.
|
|
154
154
|
|
155
155
|
* The file is expected to conform to the [RPM Changelog][RPM CHANGELOG]
|
156
156
|
format described in the Fedora packaging guidelines
|
157
|
+
|
157
158
|
* The file MUST start with a well-formatted RPM changelog string, or it will
|
158
159
|
be ignored.
|
160
|
+
|
161
|
+
Example:
|
162
|
+
|
163
|
+
* Mon Nov 06 2017 Tom Smith <tom.smith@simp.com> - 3.8.0-0
|
164
|
+
- Add feature x
|
165
|
+
|
166
|
+
**Important:** Note the leading zero in "`Nov 05`". It is a convention
|
167
|
+
|
168
|
+
that is **required** by our CHANGELOG validation tasks.
|
159
169
|
* The format is *not* fully checked before attempting to build the RPM―the
|
160
170
|
RPM build will fail if the Changelog entries are not valid.
|
161
171
|
|
data/lib/simp/componentinfo.rb
CHANGED
@@ -149,7 +149,7 @@ class Simp::ComponentInfo
|
|
149
149
|
#
|
150
150
|
def parse_changelog(changelog, latest_version_only, verbose)
|
151
151
|
# split on the entry-separating lines
|
152
|
-
changelog_entries = changelog.split(
|
152
|
+
changelog_entries = changelog.split(/\n\n+/)
|
153
153
|
latest_version = nil # 1st version found is latest version
|
154
154
|
prev_entry_date = nil
|
155
155
|
changelogs = []
|
@@ -170,7 +170,6 @@ class Simp::ComponentInfo
|
|
170
170
|
full_version += "-#{match[4]}" unless match[4].nil?
|
171
171
|
current_version = Gem::Version.new(full_version)
|
172
172
|
latest_version = current_version if latest_version.nil?
|
173
|
-
|
174
173
|
if current_version > latest_version
|
175
174
|
fail("ERROR: Changelog entries are not properly version ordered")
|
176
175
|
end
|
@@ -59,7 +59,6 @@ module Simp::Rake::Build::RpmDeps
|
|
59
59
|
# version or the RPM will be malformed
|
60
60
|
main_version, release = version.split('-')
|
61
61
|
release = '0' unless release
|
62
|
-
release = release.to_i
|
63
62
|
|
64
63
|
if Gem::Version.new(module_version) > Gem::Version.new(main_version)
|
65
64
|
rpm_metadata_content << "Obsoletes: #{pkg} < #{main_version}-#{release}.obsolete"
|
data/lib/simp/relchecks.rb
CHANGED
@@ -31,7 +31,7 @@ class Simp::RelChecks
|
|
31
31
|
# can be fetched.
|
32
32
|
# +verbose+:: Set to 'true' if you want to see detailed messages
|
33
33
|
def self.compare_latest_tag(component_dir, tags_source = 'origin', verbose = false)
|
34
|
-
info,
|
34
|
+
info, _ = load_and_validate_changelog(component_dir, verbose)
|
35
35
|
Dir.chdir(component_dir) do
|
36
36
|
# determine last tag
|
37
37
|
`git fetch -t #{tags_source} 2>/dev/null`
|
@@ -133,7 +133,6 @@ class Simp::RelChecks
|
|
133
133
|
def self.extract_version_changelog(changelog_entries, version,
|
134
134
|
release=nil, verbose=false)
|
135
135
|
|
136
|
-
version_entry_found = false
|
137
136
|
changelogs = []
|
138
137
|
changelog_entries.each do |entry|
|
139
138
|
if entry[:version] > version
|
@@ -162,7 +161,7 @@ class Simp::RelChecks
|
|
162
161
|
def self.load_and_validate_changelog(component_dir, verbose)
|
163
162
|
# only get valid changelog entries for the latest version
|
164
163
|
# (up to the first malformed entry)
|
165
|
-
info = Simp::ComponentInfo.new(component_dir, true)
|
164
|
+
info = Simp::ComponentInfo.new(component_dir, true, verbose)
|
166
165
|
|
167
166
|
changelogs = extract_version_changelog(info.changelog, info.version,
|
168
167
|
info.release, verbose)
|
@@ -225,7 +225,7 @@ describe Simp::ComponentInfo do
|
|
225
225
|
expect( info.component_dir ).to eq component_dir
|
226
226
|
expect( info.type ).to eq :asset
|
227
227
|
expect( info.version ).to eq '1.0.0'
|
228
|
-
expect( info.release ).to match
|
228
|
+
expect( info.release ).to match(/0/)
|
229
229
|
expected_changelog = [
|
230
230
|
{
|
231
231
|
:date => 'Wed Oct 18 2017',
|
@@ -63,8 +63,8 @@ describe 'Simp::Rake::Build::RpmDeps#generate_rpm_meta_files' do
|
|
63
63
|
requires_file = File.join(mod_dir, 'build', 'rpm_metadata', 'requires')
|
64
64
|
expect(File.exist?(requires_file)).to be true
|
65
65
|
expected = <<EOM
|
66
|
-
Obsoletes: pupmod-oldowner-changed_name_mod < 2.5.0-2016.obsolete
|
67
|
-
Provides: pupmod-oldowner-changed_name_mod = 2.5.0-2016.obsolete
|
66
|
+
Obsoletes: pupmod-oldowner-changed_name_mod < 2.5.0-2016.1.obsolete
|
67
|
+
Provides: pupmod-oldowner-changed_name_mod = 2.5.0-2016.1.obsolete
|
68
68
|
Requires: pupmod-foo1-bar1 = 1.0.0
|
69
69
|
Requires: pupmod-foo2-bar2 > 2.0.0
|
70
70
|
Requires: pupmod-foo3-bar3 < 3.0.0
|
@@ -78,12 +78,26 @@ NOTICE: New tag of version '1.1.0' is required for 3 changed files:
|
|
78
78
|
end
|
79
79
|
|
80
80
|
# spot check just one of many failures handled by
|
81
|
-
# Simp::RelCheck.load_and_validate_changelog, as that method is
|
81
|
+
# Simp::RelCheck.load_and_validate_changelog, as that method is
|
82
82
|
# extensively tested elsewhere.
|
83
83
|
it 'fails when module info cannot be loaded' do
|
84
|
-
comp_dir = File.join(files_dir, '
|
84
|
+
comp_dir = File.join(files_dir, 'module_without_changelog')
|
85
85
|
expect{ Simp::RelChecks.compare_latest_tag(comp_dir) }.
|
86
|
-
to raise_error(/No
|
86
|
+
to raise_error(/No CHANGELOG file found in/ )
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# If the environment variable `SIMP_SPEC_changelog` is the path to a file,
|
91
|
+
# test to see if will be considered a valid CHANGELOG (useful for debugging)
|
92
|
+
context 'with custom CHANGELOG at $SIMP_SPEC_changelog' do
|
93
|
+
_changelog_file = ENV['SIMP_SPEC_changelog'].to_s
|
94
|
+
if File.file?( _changelog_file )
|
95
|
+
it "validates the CHANGELOG file at '#{_changelog_file}'" do
|
96
|
+
comp_dir = File.dirname( _changelog_file )
|
97
|
+
expect{ Simp::RelChecks.load_and_validate_changelog(comp_dir, true) }.not_to raise_error
|
98
|
+
end
|
99
|
+
else
|
100
|
+
skip 'This test is disabled by default.'
|
87
101
|
end
|
88
102
|
end
|
89
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-rake-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.
|
4
|
+
version: 5.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-03-
|
12
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -371,8 +371,9 @@ dependencies:
|
|
371
371
|
- - "~>"
|
372
372
|
- !ruby/object:Gem::Version
|
373
373
|
version: '4.0'
|
374
|
-
description:
|
375
|
-
|
374
|
+
description: ' "simp-rake-helpers provides common methods for SIMP Rake Tasks"
|
375
|
+
|
376
|
+
'
|
376
377
|
email: simp@simp-project.org
|
377
378
|
executables: []
|
378
379
|
extensions: []
|
@@ -635,7 +636,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
635
636
|
version: '0'
|
636
637
|
requirements: []
|
637
638
|
rubyforge_project:
|
638
|
-
rubygems_version: 2.
|
639
|
+
rubygems_version: 2.6.14
|
639
640
|
signing_key:
|
640
641
|
specification_version: 4
|
641
642
|
summary: SIMP rake helpers
|