Skip to content

Commit

Permalink
(SIMP-8134) Allow *.md in pkg:compare_latest_tag (#148)
Browse files Browse the repository at this point in the history
The patch modifies the `rake pkg:compare_latest_tag` to consider `*.md`
files (like `REFERENCE.md`) as non mission-impacting updates.  This
will enable CI pipelines to run the rest of their steps.

SIMP-8134 #close
  • Loading branch information
op-ct authored Aug 3, 2020
1 parent 25f6ee6 commit fd292cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.11.4 / 2020-08-03
* Permit *.md files in `rake pkg:compare_latest_tag`

### 5.11.3 / 2020-05-19
* Fix automatically added dependencies for SIMP 6.4+

Expand Down
2 changes: 1 addition & 1 deletion lib/simp/rake/helpers/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module Simp; end
module Simp::Rake; end

class Simp::Rake::Helpers
VERSION = '5.11.3'
VERSION = '5.11.4'
end
2 changes: 1 addition & 1 deletion lib/simp/relchecks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def self.compare_latest_tag(component_dir, tags_source = 'origin', verbose = fal
# determine mission-impacting files that have changed
files_changed = `git diff tags/#{last_tag} --name-only`.strip.split("\n")
files_changed.delete_if do |file|
file[0] == '.' or file == 'Rakefile' or file =~ /^Gemfile|^spec\/|^doc\/|^rakelib\//
file[0] == '.' or file == 'Rakefile' or file =~ /^Gemfile|^spec\/|^doc\/|^rakelib\/|.*\.md\Z/
end

if files_changed.empty?
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/simp/relchecks_compare_latest_tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Simp::RelChecks.expects(:`).with('git fetch -t origin 2>/dev/null').returns("\n")
Simp::RelChecks.expects(:`).with('git tag -l').returns("1.0.0\nv1.0.1\n1.1.0\n")
Simp::RelChecks.expects(:`).with('git diff tags/1.1.0 --name-only').returns(
".travis.yml\nRakefile\nGemfile.lock\nspec/some_spec.rb\ndoc/index.html\nrakelib/mytasks.rake\n")
".travis.yml\nRakefile\nREFERENCE.md\nGemfile.lock\nspec/some_spec.rb\ndoc/index.html\nrakelib/mytasks.rake\n")

msg = " No new tag required: No significant files have changed since '1.1.0' tag\n"
expect{ Simp::RelChecks.compare_latest_tag(component_dir) }.
Expand Down

0 comments on commit fd292cd

Please sign in to comment.