Skip to content
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v0.2.0-rc.2 (2026-07-08)

### Fix

- pre-release flow

## v0.2.0-rc.1 (2026-07-08)

### Feat

- add style check to pre-commit

## v0.1.5 (2026-07-08)

### Fix
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "splinter3d_style"
version = "0.1.5"
version = "0.2.0rc2"
description = "A style checker for Splinter3D projects."
readme = ".github/README.md"
requires-python = ">=3.10,<4.0"
Expand Down
1 change: 0 additions & 1 deletion scripts/bootstrap-pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Loading