janderssonse / changelog-tag

An opinionated util for generating a Changelog from Conventional commits, bumping semver and so on.
GNU General Public License v3.0
2 stars 1 forks source link

Changelog Tag

GitHub tag (latest SemVer)

Making a nice release commit might indicate a few boring steps - adding a changelog, tagging, update project version.

So why not .. A util script to make an atomic release commit including tag, changelog and updated Project file. Supports mvn, npm or gradle. Relies on Conventional Commits-standard. Sure!

Briefly, this script:

  1. calculates and tags with next semver tag
  2. generates a changelog in the Keep-A-Changelog-format, based on your Conventional Commits Git history.
  3. updates the project file version with the version tag, if applicable.
  4. commits the changelog and tag in a release commit
  5. pushes the commit

All steps optional!

Quite early version, but useable.

Table of Contents

Installation and Requirements

Requirements

Running the application

Run alternative 1: Run as a Bash script

git@github.com:janderssonse/changelog-tag.git
# add asdf plugins from the asdf-vm .tool-versions file
$ cut -d' ' -f1 .tool-versions | xargs -i asdf plugin add {}

# install all listed .tool-versions plugins versions
$ asdf install

# pin the asdf versions (if you need)
$ asdf global git-chglog 0.15.4
$ asdf global java adoptopenjdk-jre-17.0.8+7
$ asdf global maven 3.8.8
$ asdf global nodejs 20.4.0
/path/to/changelog-tagrepo/you/just/cloned/src/changelog_tag.sh --help

Run alternative 2: Run as a Snap

Currently, the Snap is not published to the official store. So, have a look under Actions/Artifacts and get the latest build.

As the Snap is not published on the official Snap store and still has a problem with connecting to host SSH-AGENT, you have to add --devmode flag.

snap install --devmode ./changelog-tag_v0.0.1_amd64.snap

You also have to give the snap read-access to your Git configuration.

snap connect changelog-tag:gitconfig
snap connect changelog-tag:etc-gitconfig

Now, you can do an --help

changelog-tag --help

Run alternative 3: Run as a container image

There is a helpscript which will mount ssh agent and more for you, expecting Podman

/path/to/repo/you/just/cloned/scripts/run_changelog_release_container.sh '--help'

And you should get an overview of options. NOTE: as you run in an container, arguments will have to be given in one string surrounded by '' as in the example above.

Usage

A picture says more than a thousand words.

Examples

changelog_tag cli
changelog_tag with --help option
changelog_tag run
changelog_tag run
changelog_tag log
changelog_tag generated changelog example

Known issues

Roadmap:

Support

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Contributing

Please see CONTRIBUTING.

Development

General style

Tests

The project uses the Bash test framework Bats.

You can find a helper script for installing bats-core with dependencies in the (/development/):

./development/install_bats.sh

Note: The bats files are installed under the <projectdir>/development/lib, not globally on on your system

To run the tests:

./development/lib/bats/bin/bats src/test

Linting the project

There is a script that checks code quality, commit history and license compliance. Please run that. It is dependent on podman, and uses megalinter, reuse-tool, conform, kcov to check for various aspects of quality and coverage.

./development/code_quality.sh

Note: megalinter checks a lot of things, shellcheck etc, see the development/mega-linter.yml for enabled linters,


License

Licensed under the GNU General Public License v3.0 or later.

Most other files are under CC0, but check the SPDX-headers if curious.


Maintainers

janderssonse

Credits and References