git-changelog-command-line 1.97.3 → 1.98.0

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.
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Git Changelog Command Line
2
2
 
3
- [![Build Status](https://travis-ci.org/tomasbjerre/git-changelog-command-line.svg?branch=master)](https://travis-ci.org/tomasbjerre/git-changelog-command-line)
4
3
  [![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.bjurr.gitchangelog/git-changelog-command-line/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.bjurr.gitchangelog/git-changelog-command-line)
5
4
  [![NPM](https://img.shields.io/npm/v/git-changelog-command-line.svg?style=flat-square)](https://www.npmjs.com/package/git-changelog-command-line)
6
5
 
@@ -71,6 +70,8 @@ highestTag=$(npx git-changelog-command-line \
71
70
  echo Last release detected as $highestTag
72
71
  ```
73
72
 
73
+ You can also get the tag with `--print-highest-version-tag`. Highest version may be `1.2.3` and highest tag may be `v1.2.3`.
74
+
74
75
  Next version to release can be determined with:
75
76
 
76
77
  ```shell
@@ -80,6 +81,12 @@ nextVersion=$(npx git-changelog-command-line \
80
81
  echo Next release based on commits is: $nextVersion
81
82
  ```
82
83
 
84
+ There are default patterns, but you can specify the patterns with:
85
+
86
+ - `--major-version-pattern REGEXP`
87
+ - `--minor-version-pattern REGEXP`
88
+ - `--patch-version-pattern REGEXP`
89
+
83
90
  A changelog can be rendered (using [Helpers](https://github.com/tomasbjerre/git-changelog-lib#Helpers)) like this:
84
91
 
85
92
  ```shell
@@ -156,8 +163,8 @@ Handlebars.registerHelper('startsWith', function(from, options) {
156
163
  Or from command line:
157
164
 
158
165
  ```shell
159
- -cl, --custom-issue-link <string> Custom issue link. Supports
160
- variables like ${PATTERN_GROUP_1} to
166
+ -cl, --custom-issue-link <string> Custom issue link. Supports
167
+ variables like ${PATTERN_GROUP_1} to
161
168
  inject variables from pattern.
162
169
  <string>: any string
163
170
  Default: null
@@ -167,27 +174,27 @@ Or from command line:
167
174
  -cp, --custom-issue-pattern <string> Custom issue pattern.
168
175
  <string>: any string
169
176
  Default: null
170
- -ct, --custom-issue-title <string> Custom issue title. Supports
171
- variables like ${PATTERN_GROUP_1} to
177
+ -ct, --custom-issue-title <string> Custom issue title. Supports
178
+ variables like ${PATTERN_GROUP_1} to
172
179
  inject variables from pattern.
173
180
  <string>: any string
174
181
  Default: null
175
- -df, --date-format <string> Format to use when printing
182
+ -df, --date-format <string> Format to use when printing
176
183
  dates.
177
184
  <string>: any string
178
185
  Default: YYYY-MM-dd HH:mm:ss
179
- -eh, --extended-headers <string> Extended headers that will send
186
+ -eh, --extended-headers <string> Extended headers that will send
180
187
  when access JIRA. e.g. -eh CF-Access-
181
188
  Client-ID:abcde12345xyz.access [Supports Multiple occurrences]
182
189
  <string>: any string
183
190
  Default: Empty list
184
- -ex, --extended-variables <string> Extended variables that will be
191
+ -ex, --extended-variables <string> Extended variables that will be
185
192
  available as {{extended.*}}. -ex "{\"
186
- var1\": \"val1\"}" will print out
193
+ var1\": \"val1\"}" will print out
187
194
  "val1" for a template like "{{extended.
188
195
  var1}}"
189
196
  <string>: any string
190
- Default:
197
+ Default:
191
198
  -fc, --from-commit <string> From commit.
192
199
  <string>: any string
193
200
  Default: 0000000000000000000000000000000000000000
@@ -198,97 +205,97 @@ Or from command line:
198
205
  github.com/repos/tomasbjerre/git-
199
206
  changelog-command-line/
200
207
  <string>: any string
201
- Default:
208
+ Default:
202
209
  -glpn, --gitlab-project-name <string> GitLab project name.
203
210
  <string>: any string
204
- Default:
211
+ Default:
205
212
  -gls, --gitlab-server <string> GitLab server, like https:
206
213
  //gitlab.com/.
207
214
  <string>: any string
208
- Default:
215
+ Default:
209
216
  -glt, --gitlab-token <string> GitLab API token.
210
217
  <string>: any string
211
- Default:
212
- -gtok, --github-token <string> GitHub API OAuth2 token. You
213
- can get it from: curl -u
214
- 'yourgithubuser' -d '{"note":"Git Changelog
218
+ Default:
219
+ -gtok, --github-token <string> GitHub API OAuth2 token. You
220
+ can get it from: curl -u
221
+ 'yourgithubuser' -d '{"note":"Git Changelog
215
222
  Lib"}' https://api.github.
216
223
  com/authorizations
217
224
  <string>: any string
218
- Default:
225
+ Default:
219
226
  -h, --help <argument-to-print-help-for> <argument-to-print-help-for>: an argument to print help for
220
227
  Default: If no specific parameter is given the whole usage text is given
221
- -ini, --ignore-commits-without-issue Ignore commits that is not
228
+ -ini, --ignore-commits-without-issue Ignore commits that is not
222
229
  included in any issue.
223
230
  Default: disabled
224
231
  -iot, --ignore-older-than <string> Ignore commits older than YYYY-
225
232
  MM-dd HH:mm:ss.
226
233
  <string>: any string
227
- Default:
228
- -ip, --ignore-pattern <string> Ignore commits where pattern
234
+ Default:
235
+ -ip, --ignore-pattern <string> Ignore commits where pattern
229
236
  matches message.
230
237
  <string>: any string
231
238
  Default: ^Merge.*
232
- -itp, --ignore-tag-pattern <string> Ignore tags that matches
233
- regular expression. Can be used to
234
- ignore release candidates and only
239
+ -itp, --ignore-tag-pattern <string> Ignore tags that matches
240
+ regular expression. Can be used to
241
+ ignore release candidates and only
235
242
  include actual releases.
236
243
  <string>: any string
237
244
  Default: null
238
- -jba, --jira-basic-auth <string> Optional token to authenticate
245
+ -jba, --jira-basic-auth <string> Optional token to authenticate
239
246
  with Jira.
240
247
  <string>: any string
241
248
  Default: \\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b
242
249
  -jp, --jira-pattern <string> Jira issue pattern.
243
250
  <string>: any string
244
251
  Default: \\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b
245
- -jpw, --jira-password <string> Optional password to
252
+ -jpw, --jira-password <string> Optional password to
246
253
  authenticate with Jira.
247
254
  <string>: any string
248
255
  Default: \\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b
249
- -js, --jiraServer <string> Jira server. When a Jira server
250
- is given, the title of the Jira
256
+ -js, --jiraServer <string> Jira server. When a Jira server
257
+ is given, the title of the Jira
251
258
  issues can be used in the changelog.
252
259
  <string>: any string
253
260
  Default: null
254
- -ju, --jira-username <string> Optional username to
261
+ -ju, --jira-username <string> Optional username to
255
262
  authenticate with Jira.
256
263
  <string>: any string
257
264
  Default: \\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b
258
- -mavp, --major-version-pattern <string> Commit messages matching this,
259
- optional, regular expression will trigger
265
+ -mavp, --major-version-pattern <string> Commit messages matching this,
266
+ optional, regular expression will trigger
260
267
  new major version.
261
268
  <string>: any string
262
269
  Default: null
263
- -mivp, --minor-version-pattern <string> Commit messages matching this,
264
- optional, regular expression will trigger
270
+ -mivp, --minor-version-pattern <string> Commit messages matching this,
271
+ optional, regular expression will trigger
265
272
  new minor version.
266
273
  <string>: any string
267
274
  Default: ^[Ff]eat.*
268
- -ni, --no-issue-name <string> Name of virtual issue that
269
- contains commits that has no issue
275
+ -ni, --no-issue-name <string> Name of virtual issue that
276
+ contains commits that has no issue
270
277
  associated.
271
278
  <string>: any string
272
279
  Default: No issue
273
280
  -of, --output-file <string> Write output to file.
274
281
  <string>: any string
275
- Default:
276
- -pavp, --patch-version-pattern <string> Commit messages matching this,
277
- optional, regular expression will trigger
282
+ Default:
283
+ -pavp, --patch-version-pattern <string> Commit messages matching this,
284
+ optional, regular expression will trigger
278
285
  new patch version.
279
286
  <string>: any string
280
287
  Default: null
281
- -phv, --print-highest-version Print the highest version,
288
+ -phv, --print-highest-version Print the highest version,
282
289
  determined by tags in repo, and exit.
283
290
  Default: disabled
284
- -phvt, --print-highest-version-tag Print the tag corresponding to
291
+ -phvt, --print-highest-version-tag Print the tag corresponding to
285
292
  highest version, and exit.
286
293
  Default: disabled
287
- -pnv, --print-next-version Print the next version,
288
- determined by commits since highest
294
+ -pnv, --print-next-version Print the next version,
295
+ determined by commits since highest
289
296
  version, and exit.
290
297
  Default: disabled
291
- -ptf, --prepend-to-file <string> Add the changelog to top of
298
+ -ptf, --prepend-to-file <string> Add the changelog to top of
292
299
  given file.
293
300
  <string>: any string
294
301
  Default: null
@@ -296,49 +303,49 @@ Or from command line:
296
303
  <string>: any string
297
304
  Default: .
298
305
  -rhh, --register-handlebars-helper <string> Handlebar helpers, https:
299
- //handlebarsjs.com/guide/block-helpers.html,
300
- to register and use in given
306
+ //handlebarsjs.com/guide/block-helpers.html,
307
+ to register and use in given
301
308
  template.
302
309
  <string>: any string
303
- Default:
304
- -ri, --remove-issue-from-message Dont print any issues in the
310
+ Default:
311
+ -ri, --remove-issue-from-message Dont print any issues in the
305
312
  messages of commits.
306
313
  Default: disabled
307
314
  -rmp, --redmine-pattern <string> Redmine issue pattern.
308
315
  <string>: any string
309
316
  Default: #([0-9]+)
310
- -rmpw, --redmine-password <string> Optional password to
317
+ -rmpw, --redmine-password <string> Optional password to
311
318
  authenticate with Redmine.
312
319
  <string>: any string
313
- Default:
314
- -rms, --redmine-server <string> Redmine server. When a Redmine
315
- server is given, the title of the
316
- Redmine issues can be used in the
320
+ Default:
321
+ -rms, --redmine-server <string> Redmine server. When a Redmine
322
+ server is given, the title of the
323
+ Redmine issues can be used in the
317
324
  changelog.
318
325
  <string>: any string
319
326
  Default: null
320
- -rmt, --redmine-token <string> Optional token/api-key to
327
+ -rmt, --redmine-token <string> Optional token/api-key to
321
328
  authenticate with Redmine.
322
329
  <string>: any string
323
- Default:
324
- -rmu, --redmine-username <string> Optional username to
330
+ Default:
331
+ -rmu, --redmine-username <string> Optional username to
325
332
  authenticate with Redmine.
326
333
  <string>: any string
327
- Default:
328
- -rt, --readable-tag-name <string> Pattern to extract readable
334
+ Default:
335
+ -rt, --readable-tag-name <string> Pattern to extract readable
329
336
  part of tag.
330
337
  <string>: any string
331
338
  Default: /([^/]+?)$
332
339
  -sf, --settings-file <string> Use settings from file.
333
340
  <string>: any string
334
341
  Default: null
335
- --show-debug-info Please run your command with
336
- this parameter and supply output
342
+ --show-debug-info Please run your command with
343
+ this parameter and supply output
337
344
  when reporting bugs.
338
345
  Default: disabled
339
346
  -std, --stdout Print builder to <STDOUT>.
340
347
  Default: disabled
341
- -t, --template <string> Template to use. A default
348
+ -t, --template <string> Template to use. A default
342
349
  template will be used if not specified.
343
350
  <string>: any string
344
351
  Default: changelog.mustache
@@ -350,23 +357,51 @@ Or from command line:
350
357
  Default: null
351
358
  -tec, --template-content <string> String to use as template.
352
359
  <string>: any string
353
- Default:
360
+ Default:
354
361
  -tps, --template-partial-suffix <string> File ending for partials.
355
362
  <string>: any string
356
363
  Default: .hbs
357
364
  -tr, --to-ref <string> To ref.
358
365
  <string>: any string
359
366
  Default: refs/heads/master
360
- -tz, --time-zone <string> TimeZone to use when printing
367
+ -tz, --time-zone <string> TimeZone to use when printing
361
368
  dates.
362
369
  <string>: any string
363
370
  Default: UTC
364
- -ut, --untagged-name <string> When listing commits per tag,
365
- this will by the name of a virtual
366
- tag that contains commits not
371
+ -ut, --untagged-name <string> When listing commits per tag,
372
+ this will by the name of a virtual
373
+ tag that contains commits not
367
374
  available in any git tag.
368
375
  <string>: any string
369
376
  Default: No tag
370
377
  ```
371
378
 
372
- Checkout the [Git Changelog Lib](https://github.com/tomasbjerre/git-changelog-lib) for more documentation.
379
+ ## Usage - template base dir
380
+
381
+ You can use [partials](http://jknack.github.io/handlebars.java/reuse.html) in your templates.
382
+
383
+ `/dir/changelog.hbs`
384
+
385
+ ```hbs
386
+ {{#commits}}
387
+ {{> commit}}
388
+ {{/commits}}
389
+ ```
390
+
391
+ `/dir/base/commit.partial`
392
+
393
+ ```hbs
394
+ ## {{authorName}} - {{commitTime}}
395
+ [{{hashFull}}](https://server/{{hash}})
396
+ {{{message}}}
397
+ ```
398
+
399
+ This is configured like:
400
+
401
+ ```sh
402
+ npx git-changelog-command-line -std \
403
+ --template-base-dir /dir/base \
404
+ --template /dir/changelog.hbs
405
+ ```
406
+
407
+ If partials have a different ending, you can specify that with `--template-partial-suffix`.
@@ -0,0 +1,11 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: BCPG v1.64
3
+
4
+ iQEcBAABCgAGBQJhqlLmAAoJEJxRmnfYMAu77LoH/3ffa7ahF46jGpLmzAKOeYtt
5
+ yCpfsOBKxblmKiKkukou8Apnu251f7rsRK3KApOkHLMzlNysEHeTxMVyFphG7YK2
6
+ GmtNrCFm5JO479X3i2qX9chMq6ASwjRu8YkA0J/Frx8qODw8bm/cloYGYkJzIq2U
7
+ lP69fIfK7t3cpZIG5UF5eaJOC/yOfH6HXwXROp8PmbwDwnAUvGaldv08rSH5vhCt
8
+ nHDJ5nfk3+1O9/k2eSooj1p/D2VCcCAGLhivQ71UbDRdAbVDEMhUb0qBfmjk1mfY
9
+ 5HXCoStX3tIuyTAxu5hhtSi73J2c5fB2L1K5I2lSulLDBwtgBSz5SfbKnhauNic=
10
+ =ebbW
11
+ -----END PGP SIGNATURE-----
@@ -0,0 +1,11 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: BCPG v1.64
3
+
4
+ iQEcBAABCgAGBQJhqlLmAAoJEJxRmnfYMAu713UH/jit2r3ow908IebLJzDhNMT1
5
+ dYAi/uJnRkftJwB5DS9wI7WLbMZaxAravw0dgb2XCPnMYu0+Ohl4Ufx2Nuv1/dLe
6
+ bSUbhyR55s+23xdBkHCtHKZ426M2WTIZAzPqarYlScJJRatr1jeCck306BS57+zO
7
+ uNHUkdP0+NDXAzfQa2pQkN3m9HLdtIJbBv2OVvsxcn02PICrhaWLcC0AMoum2g9v
8
+ 9kP9xj8FAQFAz9Uay3upJlpWeHMEi21Bjd6kq+OdqvS6RZU5EyQbNBpZkNC2Z3La
9
+ eT5s87QHU76BdaQUHTioN9l6qY0YuP8KdhrgzMCErCVLYTC1iHn/xn9fbU3QEsI=
10
+ =B33G
11
+ -----END PGP SIGNATURE-----
@@ -0,0 +1,11 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: BCPG v1.64
3
+
4
+ iQEcBAABCgAGBQJhqlLmAAoJEJxRmnfYMAu7XO0H/0r+GDtMg3pQbv+ynPOmdkR4
5
+ 5jh+1Y7WETfZWqxALgzkyHWv7NzonoM9LiAyrNFiZnx+WvzmyyQH3Wp7cB9dQRsy
6
+ UpzkJy9hXZC+2+c62rfwMYwNYRt40HXgF8fmfLbo5GRzbnWwIx6aWWfiUdgGB/Pw
7
+ x04UtPwJ3b1Je9p5zdq70WmIdvXowvIh5NjLkya8KVuJNayS8DmLjLYRQdDK1vu2
8
+ d4BB/z/z7GfHQAO/Acrvbmb9KtBitLA1/VHDwY0CDR/PJi+YUzGaRwFC7eVkurTk
9
+ C1anfH+DJ/vvs8fDDnKCCVNZQ8xSDXQ+3soCYSBR359SkvEdUxyiMTiQPD9ZBlw=
10
+ =Bksj
11
+ -----END PGP SIGNATURE-----
@@ -0,0 +1,11 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: BCPG v1.64
3
+
4
+ iQEcBAABCgAGBQJhqlLmAAoJEJxRmnfYMAu7TXYH/RNhKO7KnvnInW0oCVthr0lu
5
+ MGGHzXEzoSZpLAwmluHOLLXjPWIe2nXTfATPjrUN6jaqE4twRgMROeYom4BHc0PR
6
+ DWD8foCsvqayuI748QxP/PSUxuEHH/M0cIm2/OoXZPsDr9jdWVyZEHHC8TtkODDd
7
+ SOXvo3x96IjPkPnwwaJAttpoU0C+nPC/HKw4qATToQ+1NT6GdYcmMDeirLzgeDj9
8
+ 1cwmLOaYBU51ny91ZjerxudwE1GhRf9ImucrI1GA3DyyJbD3obGjM8hgQ7Gi1jPk
9
+ QOruSLofpCKM4GQ8DFgiAEYMr7GEAjSAi6j4aqYtpyIfCbw/hAY/LqBet2Fl+Vs=
10
+ =nPiT
11
+ -----END PGP SIGNATURE-----
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.97.3",
2
+ "version": "1.98.0",
3
3
  "name": "git-changelog-command-line",
4
4
  "homepage": "https://github.com/tomasbjerre/git-changelog-command-line",
5
5
  "repository": "https://github.com/tomasbjerre/git-changelog-command-line",
@@ -1,11 +0,0 @@
1
- -----BEGIN PGP SIGNATURE-----
2
- Version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YMAu7ULQH/RYEzVf9z2rIkDzKPW/DujpG
5
- zDWOfytdrmTd6F3K0sqBPIrUBzw6/9r6NFzPKbgQkxktYxzyKrWJ33/45KNHSqzA
6
- 3LygwA6aPSRyCUTE01A8A8CNinRzHkXegHtGMC73A1aPc3eVcyTMqRP+MO+WMXtA
7
- nzcT7ZR8KWqOSW+dadg/uahqtZjOvEH6jth0hdl3XamqEXygJAGKQZ9GNcMttETR
8
- 5C+1x1+ky6UfHSw9DcPv7OkZh3EaxWtEXriEaOFnHt288XxGGb8amk48LoPQosyU
9
- 2hV3LDlNGhpeooGCpYgr6oVY+2ZztP8/hyEq4KPR1pfw1mTtwECFJbc2eQ6wZa4=
10
- =GVaQ
11
- -----END PGP SIGNATURE-----
@@ -1,11 +0,0 @@
1
- -----BEGIN PGP SIGNATURE-----
2
- Version: BCPG v1.64
3
-
4
- iQEcBAABCgAGBQJhmqYmAAoJEJxRmnfYMAu79gYH/2MNdGcPx9APexhZ6uwRge9d
5
- oBFUt6fC+hohf+nEys8cdW1CZvFZwyqshWVoFQY36ZyUCrX0cVsQ7oZ2brHCuBFU
6
- 9UoH3mAY66RNE0uGhIG+c7oKcV516N50j7EWBceEKXsTgiiRz+wDDPoNUhtwy8dC
7
- Auojgne8xqZbWlUPjKh7qhU2Tp2SWBPPcd0VBW4FbBiEbfHKOG/zqr5al50wZ1ZF
8
- KS9/QN1Sdo/L06IKTRIQy0DASVRy21ooQhlt+LfY23cTn/d51oqXL8h5QoMcUgiA
9
- mtU9QIKNTxZ8ccfNcVAu+17FNrd0c5J/y2xBMwSKpKnK/IN4Cx0OzuZsupK0eU8=
10
- =pWER
11
- -----END PGP SIGNATURE-----