changelog_merger 0.1.3 → 0.1.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: 720e02f4c54c3515b964669d13813b6b774f75d1
4
- data.tar.gz: da90361ab3203505ce23d0a17e5e69f3643d4889
3
+ metadata.gz: 072057ebe5189dce66b7dfe3af8e6a197203f515
4
+ data.tar.gz: cef4de287d71dea139880baa280e504fd877faf0
5
5
  SHA512:
6
- metadata.gz: e97e4fa8dd54eddfa60687bb3cb7b5069b4493b26dd7d04a93528216a078dfe914a24a6b6ebdfec42862c8a64285ab6ab95a0b0d44b5da9eb4b89d060ecb9ded
7
- data.tar.gz: ac7e3dfd7060ed93a82b8f0805823671de368563cbacdf1e85cec353910f42e1f75ad31ced8f692b36c55fddbcb11bf48900d3d8be38a36d6cbdca48a4bf0786
6
+ metadata.gz: f3298b46781807967ca816a050ff756fda24c40d0ba42e218bd16433fc76569e3a072eb8d159d058dd94f1c11552551ebb162a6f0d4c2c7513420d159037cdc2
7
+ data.tar.gz: ab05e60bb85ad1e7f58d3a2f8c506d7704e16cfff9d50660595a423b85cb3428a12c4603724b2011f39dd4c57a3208bc694e70bac5da9e16bed8e32505f60dd2
@@ -89,28 +89,29 @@ And special for such cases - I created a [github_changelog_generator](https://gi
89
89
 
90
90
  By using this script your Change Log will look like this: [Click me!](https://github.com/skywinder/#{options[:project]}/blob/add-change-log-file/#{options[:output]})
91
91
 
92
- ***What’s the point of a change log?***
92
+ \> ***What’s the point of a change log?***
93
93
  To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project.
94
+ \> :copyright: *[http://keepachangelog.com](http://keepachangelog.com/)*
94
95
 
95
- And now you don't need to spend a lot of :hourglass_flowing_sand: for filling it manually!
96
+ And now you do not need to spend a lot of :hourglass_flowing_sand: for filling it manually!
96
97
 
97
98
  Some essential features of **github_changelog_generator**:
98
99
 
99
100
  - Generate **neat** Change Log file according basic [change log guidelines](http://keepachangelog.com). :gem:
100
101
 
101
102
  - **Distinguish** issues **according labels**:
102
- - Merged pull requests (all `merged` pull-requests)
103
- - Bug fixes (by label `bug` in issue)
104
- - Enhancements (by label `enhancement` in issue)
105
- - Issues (closed issues `w/o any labels`)
103
+ - Merged pull requests (all \`merged\` pull-requests)
104
+ - Bug fixes (by label \`bug\` in issue)
105
+ - Enhancements (by label \`enhancement\` in issue)
106
+ - Issues (closed issues \`w/o any labels\`)
106
107
 
107
- - it **exclude** not-related to changelog issues (any issue, that has label `question` `duplicate` `invalid` `wontfix` ) :scissors:
108
+ - it **exclude** not-related to changelog issues (any issue, that has label \`question\` \`duplicate\` \`invalid\` \`wontfix\` ) :scissors:
108
109
 
109
- - You can set which labels should be included/excluded and apply a lot of other customisations, to fit changelog for your personal style :tophat: (*look `github_changelog_generator --help` for details)*
110
+ - You can set which labels should be included/excluded and apply a lot of other customisations, to fit changelog for your personal style :tophat: (*look \`github_changelog_generator --help\` for details)*
110
111
 
111
- You can easily update this file in future by simply run script: `github_changelog_generator #{options[:repo]}` in your repo folder and it make your Change Log file up-to-date again!
112
+ You can easily update this file in future by simply run script: \`github_changelog_generator #{options[:repo]}\` in your repo folder and it make your Change Log file up-to-date again!
112
113
 
113
- Since now you don't have to fill your `CHANGELOG.md` manually: just run script, relax and take a cup of :coffee: before your next release!
114
+ Since now you do not have to fill your \`CHANGELOG.md\` manually: just run script, relax and take a cup of :coffee: before your next release!
114
115
 
115
116
  Hope you find this commit as useful. :wink:"
116
117
 
@@ -1,3 +1,3 @@
1
1
  module ChangelogMerger
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -17,11 +17,26 @@ module ChangelogMerger
17
17
  else
18
18
  go_to_work_dir
19
19
  clone_repo_and_cd
20
+ check_existing_changelog_file
20
21
  generate_change_log
21
22
  add_commit_push
22
23
  end
23
24
  end
24
25
 
26
+ def check_existing_changelog_file
27
+ if @options[:output] == 'CHANGELOG.md'
28
+ if File.exist? @options[:output]
29
+
30
+ puts "#{@options[:output]} found"
31
+
32
+ extension = File.extname(@options[:output])
33
+ base = File.basename(@options[:output], extension)
34
+ @options[:output] = base + '_AUTO' + extension
35
+ puts "Change it to: #{@options[:output]}"
36
+ end
37
+ end
38
+ end
39
+
25
40
  def add_commit_push
26
41
  execute_line('hub fork')
27
42
  execute_line('git checkout -b add-change-log-file')
@@ -51,7 +66,7 @@ module ChangelogMerger
51
66
  return nil
52
67
  end
53
68
  puts line
54
- value = %x[#{line}]
69
+ value = %x(#{line})
55
70
  puts value
56
71
  check_exit_status(value)
57
72
  value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelog_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev