Skip to content
/ heylogs Public
forked from nbbrd/heylogs

Set of tools to deal with the keep-a-changelog format

License

Notifications You must be signed in to change notification settings

koppor/heylogs

 
 

Repository files navigation

heylogs

Download

heylogs is a set of tools to deal with the keep-a-changelog format, a format designed to be human-readable. It can be used as a linter in interactive sessions and automations.

Key points:

Features:

  • Summarizes content
  • Checks format
  • Extracts versions

Command-line tool

Heylogs CLI runs on any desktop operating system such as Microsoft Windows, Solaris OS, Apple macOS, Ubuntu and other various Linux distributions. It requires a Java SE Runtime Environment (JRE) version 8 or later to run on such as OpenJDK.

Installation

The easiest way of installing the CLI is to use a package manager.
Each operating system has its own manager. See the list below for specific instructions.

Scoop

WINDOWS

scoop bucket add nbbrd https://github.com/nbbrd/scoop-nbbrd.git
scoop install heylogs

Homebrew

MACOS LINUX

brew install nbbrd/tap/heylogs

JBang

The CLI can be run by JBang almost anywhere using one of these options:

  • Specific version (Maven coordinates): com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin
  • Latest version (JBang catalog): heylogs@nbbrd

WINDOWS MACOS LINUX

jbang com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin <command> [<args>]

GITHUB

- uses: jbangdev/jbang-action@v0.110.1
  with:
    script: com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin
    scriptargs: "<command> [<args>]"

Note that the trust parameter is required if the catalog is used instead of the Maven coordinates:
trust: https://github.com/nbbrd/jbang-catalog

DOCKER

docker run -v `pwd`:/ws --workdir=/ws jbangdev/jbang-action com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin <command> [<args>]

Maven command-line

WINDOWS MACOS LINUX GITHUB

mvn dependency:copy -Dartifact=com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:jar:bin -DoutputDirectory=. -Dmdep.stripVersion -q
java -jar heylogs-cli-bin.jar <command> [<args>]

Zero installation

WINDOWS MACOS LINUX GITHUB

The CLI is a single executable jar, so it doesn't need to be installed to be used.
To use the CLI without installing it:

  1. Download the latest jar binary (heylogs-_VERSION_-bin.jar) at:
    https://github.com/nbbrd/heylogs/releases/latest
  2. Run this jar by calling:
    java -jar heylogs-cli-_VERSION_-bin.jar <command> [<args>]

Maven plugin

Heylogs is available as a Maven plugin and therefore may be part of the build process.

The following script checks the changelog on every build:

<plugin>
    <groupId>com.github.nbbrd.heylogs</groupId>
    <artifactId>heylogs-maven-plugin</artifactId>
    <version>${heylogs.version}</version>
    <executions>
        <execution>
            <id>check-changelog</id>
            <goals>
                <goal>check</goal>
            </goals>
            <inherited>false</inherited>
            <configuration>
                <semver>true</semver>
            </configuration>
        </execution>
    </executions>
</plugin>

The following script extracts the latest version from the changelog during a release:

<profile>
    <id>release</id>
    <build>
        <plugins>
            <plugin>
                <groupId>com.github.nbbrd.heylogs</groupId>
                <artifactId>heylogs-maven-plugin</artifactId>
                <version>${heylogs.version}</version>
                <executions>
                    <execution>
                        <id>extract-changelog</id>
                        <goals>
                            <goal>extract</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</profile>

Developing

This project is written in Java and uses Apache Maven as a build tool.
It requires Java 8 as minimum version and all its dependencies are hosted on Maven Central.

The code can be build using any IDE or by just type-in the following commands in a terminal:

git clone https://github.com/nbbrd/heylogs.git
cd heylogs
mvn clean install

Contributing

Any contribution is welcome and should be done through pull requests and/or issues.

Licensing

The code of this project is licensed under the European Union Public Licence (EUPL).

About

Set of tools to deal with the keep-a-changelog format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%