Releases: korandoru/hawkeye
v5.3.1
Install hawkeye 5.3.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/korandoru/hawkeye/releases/download/v5.3.1/hawkeye-installer.sh | sh
Download hawkeye 5.3.1
File | Platform | Checksum |
---|---|---|
hawkeye-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
hawkeye-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
hawkeye-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
hawkeye-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v5.2.1
What's Changed
Full Changelog: v5.2.0...v5.2.1
v5.2.0
What's Changed
- build: try workaround workdir in container is not owned by current user by @tisonkun in #118
- fix: remove file only header should take the last license line by @tisonkun in #119
- refactor: migrate git2 to gix by @tisonkun in #121
- ci: bump build-push-action and update docs by @tisonkun in #122
- ci: add gha smoke test by @tisonkun in #125
- feat: support
.mbt
extension for moonbit language by @DiamondMofeng in #124 - ci: GHA smoke test use local build image by @tisonkun in #127
- refactor: avoid the GitHelper and instead keep data on the stack by @Byron in #126
New Contributors
- @DiamondMofeng made their first contribution in #124
- @Byron made their first contribution in #126
Full Changelog: v5.0.1...v5.2.0
v5.0.1
Full Changelog: v5.0.0...v5.0.1
v5.0.0
Full Changelog: v4.0.5...v5.0.0
Rewrite it in Rust, to fully get rid of the Native Image x Docker Image shit.
So all the JVM related distributions have gone now. Namely the alpha Maven plugin, alpha Gradle plugin, and executable JAR. I suppose that fewer people use these distributions and they can still get it from <=v4.
Docker images are not affected. You can still use:
docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v5 format
But now the hawkeye-native
image is the same as hawkeye
(~28MB).
In addition, you can now install hawkeye
via Cargo:
cargo install hawkeye
All the underneath functionality should be the same, except those related to JVM classpath is not a thing now.
It's still possible we distribute this native tool as a Maven plugin / Gradle plugin. Just as Docker written in Golang has the related plugin. But the approach would be quite different and the platform-toolchain classifier is still absent in the Java world, making a challenge to bridge Rust and Java. os-detector may help, but an expose from JVM's reflection would be desired (Not object reflection, I mean, JVM provides APIs to describe itself, including platform, toolchain, and other build/platform info).
Back to HawkEye.
You can use HawkEye in GitHub Actions or in your local machine. HawkEye provides three basic commands:
# check license headers
hawkeye check
# format license headers (auto-fix all files that failed the check)
hawkeye format
# remove license headers
hawkeye remove
You can use -h
or --help
to list out all config options.
GitHub Actions
The HawkEye GitHub Action enables users to run license header check by HawkEye with a config file.
First of all, add a licenserc.toml
file in the root of your project. The simplest config for projects licensed under Apache License 2.0 is as below:
Note The full configurations can be found in the configuration section.
headerPath = "Apache-2.0.txt"
[properties]
inceptionYear = 2023
copyrightOwner = "tison <[email protected]>"
You should change the copyright line according to your information.
To check license headers in GitHub Actions, add a step in your GitHub workflow:
- name: Check License Header
uses: korandoru/hawkeye@v5
Cargo Install
The hawkeye
executable can be installed by:
cargo install hawkeye
Docker
Alpine image (~27MB):
docker run -it --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye check
I'm somewhat rushing in this rewrite so there is still a lot of rooms to improve the experience, performance, and code style. But I'm confident that the most frequent user journey is held and works well.
Enjoy :D
v5.0.0-alpha.5
Full Changelog: v4.0.5...v5.0.0-alpha.5
v4.0.5
What's Changed
Full Changelog: v4.0.4...v4.0.5
v4.0.4
v4.0.3
What's Changed
Full Changelog: v4.0.2...v4.0.3
v4.0.2
What's Changed
Full Changelog: v4.0.1...v4.0.2