From 7cad8a888b71e77ff0df72aa5ad06b29e04984ec Mon Sep 17 00:00:00 2001 From: Mathieu BARLEON Date: Wed, 8 Jul 2026 15:34:42 +0200 Subject: [PATCH 1/4] feat: add style check to pre-commit --- .github/README.md | 10 +++++++++- .pre-commit-config.yaml | 8 +++++++- scripts/bootstrap-pre-commit.sh | 1 - 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 592a997..dd1b175 100644 --- a/.github/README.md +++ b/.github/README.md @@ -58,10 +58,18 @@ pipx install "$(ls dist/*.whl | head -n 1)" Install a published release artifact with `pipx`: ```bash -pipx install https://github.com/Splinter3D/StyleCheck/releases/download/vX.Y.Z/splinter3d_style-X.Y.Z-py3-none-any.whl +pipx install git+https://github.com/Splinter3D/StyleCheck splinter3d_style ``` +## Update From A Release + +Update a the package with pipx + +```bash +pipx upgrade splinter3d_style +``` + ## Use With pre-commit Add this repository and a release tag to your `.pre-commit-config.yaml`: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cc4a04..13f8894 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: hooks: - id: check_versions name: check_versions - entry: bash -c 'scripts/check_versions.sh' + entry: bash -c 'scripts/check-versions.sh' language: system pass_filenames: false always_run: true @@ -33,3 +33,9 @@ repos: language: system pass_filenames: false always_run: true + - id: splinter3d-style + name: splinter3d-style + entry: bash -c 'poetry run splinter3d_style' + language: system + pass_filenames: false + always_run: true diff --git a/scripts/bootstrap-pre-commit.sh b/scripts/bootstrap-pre-commit.sh index 4c45f84..13a589f 100755 --- a/scripts/bootstrap-pre-commit.sh +++ b/scripts/bootstrap-pre-commit.sh @@ -4,6 +4,5 @@ if ! command -v pre-commit &> /dev/null; then python3 -m pip install --user pre-commit || echo "Could not install pre-commit. Please install it with your package manager." && exit 1 fi pre-commit install -pre-commit install --hook-type pre-push || true pre-commit run --all-files || true echo "pre-commit hooks installed." From 1e085278dbf4e00450be34ba2cbac23429a12a0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:37:39 +0000 Subject: [PATCH 2/4] chore(release): 0.2.0rc1 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2534a27..c1e4d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.2.0-rc.1 (2026-07-08) + +### Feat + +- add style check to pre-commit + ## v0.1.5 (2026-07-08) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 95a4cca..da0c86b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "splinter3d_style" -version = "0.1.5" +version = "0.2.0rc1" description = "A style checker for Splinter3D projects." readme = ".github/README.md" requires-python = ">=3.10,<4.0" From f06a2e7bd9e42c435f851dc452c6a0f61ac90dca Mon Sep 17 00:00:00 2001 From: Mathieu BARLEON Date: Wed, 8 Jul 2026 15:41:40 +0200 Subject: [PATCH 3/4] fix: pre-release flow --- .github/workflows/release.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0dd196..0acd98d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,10 +114,26 @@ jobs: path: dist - name: Create GitHub release - uses: softprops/action-gh-release@v3 - with: - tag_name: ${{ needs.prepare.outputs.tag_name }} - name: "Release: ${{ needs.prepare.outputs.tag_name }}" - files: dist/* - generate_release_notes: true - prerelease: ${{ needs.prepare.outputs.prerelease == 'true' }} + run: | + tag="${{ needs.prepare.outputs.tag_name }}" + title="Release: ${tag}" + + if gh release view "$tag" >/dev/null 2>&1; then + echo "Release $tag already exists, skipping." + exit 0 + fi + + args=( + release create "$tag" + dist/* + --title "$title" + --generate-notes + ) + + if [[ "${{ needs.prepare.outputs.prerelease }}" == "true" ]]; then + args+=(--prerelease) + fi + + gh "${args[@]}" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e6282cfa0a22e8d320179f19d3889fe6199cdb53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:42:37 +0000 Subject: [PATCH 4/4] chore(release): 0.2.0rc2 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e4d41..8f2728c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.2.0-rc.2 (2026-07-08) + +### Fix + +- pre-release flow + ## v0.2.0-rc.1 (2026-07-08) ### Feat diff --git a/pyproject.toml b/pyproject.toml index da0c86b..2d4705f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "splinter3d_style" -version = "0.2.0rc1" +version = "0.2.0rc2" description = "A style checker for Splinter3D projects." readme = ".github/README.md" requires-python = ">=3.10,<4.0"