shoru-sssssaaaaaa / pre-commit-ktlint

MIT License
2 stars 0 forks source link

Add PGP verification on installation by `curl` #6

Closed fabasoad closed 2 years ago

fabasoad commented 2 years ago

Changelog

Add "Create release" pipeline

This pipeline helps to create a release triggered on a tag creation. To create a release:

git checkout main # based on latest main
git pull # be sure that it is up-to-date
git tag v1.2.3 # random version for an example
git push origin v1.2.3 # it triggers the pipeline and new release will be created

Add gpg support

Official documentation recommends to verify PGP signature before using ktlint. This verification has been added on an installation step using curl.

Add brew support

This script gives precedence to brew in case this script is running on a machine where brew tool is installed, otherwise it downloads ktlint with curl as it was before. In a future would be good to add additional tools support such as apt, snap, etc. to avoid manual PGP signature verification.

Add pre-commit.ci support

Very nice feature provided by pre-commit developers - separate CI system to run pre-commit checks: https://pre-commit.ci/

Highly recommend it as it reduces manual work on running these checks manually using GHA. To configure it:

Once you done this you will see in pre-commit.ci dashboard all your runnings. Also, this verification will be run on each PR. Once you merge this PR to main then you will see pre-commit.ci badge as green in README file.

Other