Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Sep 8, 2022
2 parents 2f5303e + 2128324 commit f543614
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.1.0] - 2022-09-08

### Added

- Initial release

[Unreleased]: https://github.com/nbbrd/heylogs/compare/...HEAD
[Unreleased]: https://github.com/nbbrd/heylogs/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/nbbrd/heylogs/releases/tag/v0.1.0
2 changes: 1 addition & 1 deletion heylogs-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.nbbrd.heylogs</groupId>
<artifactId>heylogs-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>

<artifactId>heylogs-api</artifactId>
Expand Down
30 changes: 27 additions & 3 deletions heylogs-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.nbbrd.heylogs</groupId>
<artifactId>heylogs-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>

<artifactId>heylogs-cli</artifactId>
Expand Down Expand Up @@ -144,6 +144,30 @@
<useMavenLogger>true</useMavenLogger>
</configuration>
</execution>
<!-- Extract the latest version from CHANGELOG.md -->
<execution>
<id>extract-changelog</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>${project.x.mainClass}</argument>
<argument>extract</argument>
<argument>-i</argument>
<argument>${project.parent.basedir}/CHANGELOG.md</argument>
<argument>-o</argument>
<argument>${project.build.directory}/CHANGELOG.md</argument>
<argument>--limit</argument>
<argument>1</argument>
</arguments>
<useMavenLogger>true</useMavenLogger>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down Expand Up @@ -171,11 +195,11 @@
<release>
<github>
<skipTag>true</skipTag>
<draft>true</draft>
<draft>false</draft>
<!-- Fix default value -->
<branch>master</branch>
<changelog>
<external>${project.basedir}/../CHANGELOG.md</external>
<external>${project.build.directory}/CHANGELOG.md</external>
</changelog>
</github>
</release>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void printStylish(Path inputFile, List<Failure> failures) {
int c = failures.stream().mapToInt(failure -> getNumberOfDigits(failure.getColumn())).max().orElse(0);
int m = failures.stream().mapToInt(failure -> failure.getMessage().length()).max().orElse(0);

failures.forEach(failure -> System.out.println(String.format(" %-" + l + "d:%-" + c + "d error %-" + m + "s %s", failure.getLine(), failure.getColumn(), failure.getMessage(), failure.getRule())));
failures.forEach(failure -> System.out.println(String.format(" %" + l + "d:%-" + c + "d error %-" + m + "s %s", failure.getLine(), failure.getColumn(), failure.getMessage(), failure.getRule())));
}

private static int getNumberOfDigits(int number) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.nbbrd.heylogs</groupId>
<artifactId>heylogs-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
<packaging>pom</packaging>

<name>heylogs</name>
Expand Down

0 comments on commit f543614

Please sign in to comment.