Skip to content

Commit 92c5377

Browse files
committed
chore: added changelog generator make commands
1 parent 16bead1 commit 92c5377

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

Makefile

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
1-
.PHONY: default install
1+
.PHONY: default install uninstall chl chl-first
22

33
default:
44
@echo 'Git extras installation helper from JustCoded'
55

66
install:
77
sudo cp -f ./bin/* /usr/local/bin/
88
sudo chmod +x /usr/local/bin/git-*
9+
10+
uninstall:
11+
sudo rm /usr/local/bin/git-*
12+
13+
##
14+
# CHANGELOG vars and targets
15+
##
16+
CONV_CHL_IMAGE := justcoded/php-conventional-changelog:latest
17+
CONV_CHL_DR := docker run -it --rm --volume "$$PWD":/codebase ${CONV_CHL_IMAGE} bash
18+
CONV_CHL_CMD := conventional-changelog --config changelog-config.php
19+
20+
##
21+
# @command chl Generate changelog based on conventional commits
22+
##
23+
chl:
24+
${CONV_CHL_DR} \
25+
-c "${CONV_CHL_CMD}"
26+
27+
##
28+
# @command chl-first Generate changelog based on conventional commits, first version
29+
##
30+
chl-first:
31+
${CONV_CHL_DR} \
32+
-c "${CONV_CHL_CMD} --first-release"

changelog-config.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* @see: https://github.com/marcocesarato/php-conventional-changelog/blob/main/docs/config.md
4+
*/
5+
6+
return [
7+
'path' => 'CHANGELOG.md',
8+
'headerTitle' => 'Changelog',
9+
'headerDescription' => 'All notable changes to this project will be documented in this file.
10+
11+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
12+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13+
14+
---',
15+
'ignoreTypes' => ['build', 'chore', 'ci', 'docs', 'perf', 'refactor', 'revert', 'style', 'test', 'bug'],
16+
17+
'hiddenHash' => true,
18+
];

0 commit comments

Comments
 (0)