Skip to content

Commit c425d44

Browse files
committed
yaaaaa
1 parent 9474968 commit c425d44

File tree

6 files changed

+65
-17
lines changed

6 files changed

+65
-17
lines changed

.github/workflows/homebrew_tap.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ jobs:
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
2123

2224
- name: Set vars
2325
id: vars
2426
env:
2527
INPUT_TAG: ${{ github.event.release.tag_name }}
2628
GH_TOKEN: ${{ github.token }}
2729
run: |
30+
set -euo pipefail
2831
TAG="${INPUT_TAG}"
2932
# If manually dispatched, pick the latest release tag.
3033
if [ -z "$TAG" ]; then
@@ -37,6 +40,7 @@ jobs:
3740
env:
3841
GH_TOKEN: ${{ github.token }}
3942
run: |
43+
set -euo pipefail
4044
TAG="${{ steps.vars.outputs.tag }}"
4145
VER="${{ steps.vars.outputs.ver }}"
4246
for i in {1..30}; do
@@ -53,6 +57,7 @@ jobs:
5357
env:
5458
GH_TOKEN: ${{ github.token }}
5559
run: |
60+
set -euo pipefail
5661
VER="${{ steps.vars.outputs.ver }}"
5762
mkdir -p _release
5863
# Ensure a clean slate in case of prior attempts/reruns.
@@ -63,21 +68,30 @@ jobs:
6368
- name: Compute SHA256
6469
id: sha
6570
run: |
71+
set -euo pipefail
6672
VER="${{ steps.vars.outputs.ver }}"
6773
echo "sha=$(sha256sum _release/clematis-${VER}.tar.gz | awk '{print $1}')" >> "$GITHUB_OUTPUT"
6874
6975
- name: Update Formula file
7076
run: |
77+
set -euo pipefail
7178
TAG="${{ steps.vars.outputs.tag }}"
7279
VER="${{ steps.vars.outputs.ver }}"
7380
SHA="${{ steps.sha.outputs.sha }}"
7481
F="Formula/clematis.rb"
82+
if [ ! -f "$F" ]; then
83+
echo "Formula file not found at $F" >&2
84+
exit 1
85+
fi
7586
echo "Updating $F → tag=$TAG ver=$VER sha=$SHA"
7687
sed -i -E "s|^ url \".*\"| url \"https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG}/clematis-${VER}.tar.gz\"|g" "$F"
7788
sed -i -E "s|^ sha256 \".*\"| sha256 \"${SHA}\"|g" "$F"
7889
sed -i -E "s|^ version \".*\"| version \"${VER}\"|g" "$F"
7990
echo "---"
8091
grep -E "^ (url|sha256|version)" -n "$F"
92+
grep -q "url \"https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG}/clematis-${VER}.tar.gz\"" "$F" || { echo "URL not updated"; exit 1; }
93+
grep -q "sha256 \"${SHA}\"" "$F" || { echo "SHA not updated"; exit 1; }
94+
grep -q "version \"${VER}\"" "$F" || { echo "Version not updated"; exit 1; }
8195
8296
# Use a PAT so the PR is authored by a real user and downstream CI triggers.
8397
- name: Create PR with updated formula (PAT)

.github/workflows/pkg_build.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,19 @@ jobs:
530530
with:
531531
fetch-depth: 1
532532

533+
- name: Verify VERSION matches tag
534+
shell: bash
535+
run: |
536+
set -euo pipefail
537+
TAG="${GITHUB_REF_NAME#v}"
538+
FILE="$(tr -d '\r\n' < clematis/VERSION)"
539+
echo "Tag: $TAG"
540+
echo "File: $FILE"
541+
if [ "$TAG" != "$FILE" ]; then
542+
echo "VERSION mismatch: $FILE (file) vs $TAG (tag)" >&2
543+
exit 1
544+
fi
545+
533546
- name: Verify no CRLF in text files
534547
shell: bash
535548
run: |
@@ -1243,14 +1256,6 @@ jobs:
12431256
print("OK: LICENSE and NOTICE present in both sdist and wheel")
12441257
PY
12451258
1246-
- name: Upload artifacts to Release (sdist + wheel)
1247-
if: ${{ github.event_name == 'release' }}
1248-
uses: softprops/action-gh-release@v2
1249-
with:
1250-
files: |
1251-
dist/*.tar.gz
1252-
dist/*.whl
1253-
fail_on_unmatched_files: true
12541259
12551260
- name: Generate CycloneDX SBOM (from clean venv)
12561261
run: |
@@ -1273,6 +1278,12 @@ jobs:
12731278
print("SBOM JSON OK")
12741279
PY
12751280
1281+
- name: Checksums (SHA256SUMS.txt)
1282+
run: |
1283+
cd dist
1284+
sha256sum * > SHA256SUMS.txt
1285+
cat SHA256SUMS.txt
1286+
12761287
- name: Upload SBOM as workflow artifact
12771288
uses: actions/upload-artifact@v4
12781289
with:
@@ -1287,9 +1298,14 @@ jobs:
12871298
dist/*.whl
12881299
dist/*.tar.gz
12891300
1290-
- name: Attach SBOM to Release
1291-
if: ${{ github.event_name == 'release' }}
1292-
env:
1293-
GH_TOKEN: ${{ github.token }}
1294-
run: |
1295-
gh release upload "${{ github.event.release.tag_name }}" dist/sbom.cdx.json --clobber
1301+
- name: Upload artifacts to Release (sdist + wheel + SBOM + checksums)
1302+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'release' }}
1303+
uses: softprops/action-gh-release@v2
1304+
with:
1305+
files: |
1306+
dist/*.tar.gz
1307+
dist/*.whl
1308+
dist/SHA256SUMS.txt
1309+
dist/sbom.cdx.json
1310+
generate_release_notes: true
1311+
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}

CHANGELOG.MD

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,26 @@ All notable changes to this project will be documented in this file.
88

99

1010

11+
1112
## [Unreleased]
1213

14+
## [0.9.0] - 2025-10-08
15+
16+
### Changed (PR126 — Release prep; 0.9.0b1 → 0.9.0)
17+
- Stable release; no code changes since **0.9.0b1**.
18+
- Tagging a signed release triggers `.github/workflows/pkg_build.yml` (builds sdist/wheels and prints SHA256s) and `.github/workflows/homebrew_tap.yml` (updates `url`, `sha256`, and `version` in the tap); SBOM and SLSA attestation are attached to the GitHub release.
19+
20+
### Added/Fixed (PR125 — Windows temp dirs & Unicode paths)
21+
- Replaced hard‑coded temp paths with `tempfile.gettempdir()` in code paths and tests that create ephemeral files.
22+
- All text file I/O now specifies `encoding="utf-8"`; `Path.read_text`/`write_text` calls in tests use explicit encodings.
23+
- Logging paths honor `CLEMATIS_LOG_DIR` (primary) over legacy `CLEMATIS_LOGS_DIR`; fallbacks remain `.logs/` under the repo when env is unset.
24+
- Snapshots respect `CLEMATIS_SNAPSHOT_DIR` for read/write; default behavior is unchanged when unset.
25+
- New Windows‑only test writes/reads under a Unicode temp directory to catch path/encoding regressions.
26+
27+
### Notes
28+
- No functional changes versus **0.9.0b1**; see **0.9.0a1** and **0.9.0a2** below for the feature work carried into this stable release.
29+
30+
1331
### Added (PR121 — CLI help stability & determinism)
1432
- **Deterministic help:** `cli_utils.py` provides a fixed‑width formatter; constant epilog (`"See Operator Guide: docs/operator-guide.md"`); subcommands listed **alphabetically**.
1533
- **CLI main:** `clematis/cli/main.py` surfaces the version in the description, sets `allow_abbrev=False`, sorts subcommands, and uses the deterministic formatter.

Formula/clematis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Clematis < Formula
99
url "https://github.com/vecipher/Clematis3/releases/download/v0.9.0a2/clematis-0.9.0a2.tar.gz"
1010
sha256 "4cb4ca47e94d58e1a3b355d67ef8be54744452a8ee34cbaf6161d044bd20cd4c"
1111
license "MIT"
12-
version "0.9.0a2"
12+
version "0.9.0b1"
1313

1414
depends_on "python@3.13"
1515

clematis/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0a2
1+
0.9.0b1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "clematis"
3-
version = "0.9.0a2"
3+
version = "0.9.0b1"
44
description = "Clematis — deterministic mind-like simulation engine (M1–M8 baseline)"
55
readme = "README.md"
66
requires-python = ">=3.11,<3.14"

0 commit comments

Comments
 (0)