diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eae0dc..8c49d87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ All notable changes to this project will be documented in this file. ### 📚 Documentation - Terminal emulators compatibility and good first issues (#56) +- *(contributing)* Add setup step + +### 🎨 Styling + +- *(git)* Enforce conventional commits on git push with a hook ### ⚙️ Miscellaneous Tasks @@ -22,7 +27,7 @@ All notable changes to this project will be documented in this file. ### Build -- *(infer)* Drop infer dependency and refactor code to a simpler heuristic +- *(infer)* Drop infer dependency and refactor code to a simpler heuristic (#58) ## [0.5.1] - 2024-11-20 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb4b62b..19cfe79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,20 +24,24 @@ These are pretty much the only things you need to have installed on your machine cd television git remote add upstream https://github.com/alexpasmantier/television.git ``` -4. Create a new branch for your feature or bug fix: +4. Install the project dependencies by running the following command: + ```shell + make setup + ``` +5. Create a new branch for your feature or bug fix: ```shell git checkout -b ``` -5. Make your changes and commit them to your branch: +6. Make your changes and commit them to your branch: ```shell git add . git commit -m "Your commit message" ``` -6. Push your changes to your forked repository: +7. Push your changes to your forked repository: ```shell git push origin ``` -7. Create a pull request by navigating to the original repository and clicking on the `New pull request` button. +8. If not done automatically, create a pull request by navigating to the original repository and clicking on the `New pull request` button. ### Building the project diff --git a/Makefile b/Makefile index cd064f8..b72c8f6 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ setup: @mkdir -p .git/hooks @echo "make fix" > .git/hooks/pre-commit @chmod +x .git/hooks/pre-commit + @echo "installing convco..." + @cargo install convco + @echo "make check-commits" > .git/hooks/pre-push + @chmod +x .git/hooks/pre-push @echo "Done" clean: @@ -58,3 +62,7 @@ publish: update-changelog: @echo "Updating changelog" @git cliff -o CHANGELOG.md + +check-commits: + @echo "Checking commits (see https://www.conventionalcommits.org/)" + @convco check origin/main..HEAD