diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcb6301..2634d57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - java: [21, 25] + java: [25] steps: - uses: actions/checkout@v4 @@ -25,9 +25,8 @@ jobs: cache: maven - name: Build & verify the sample reactor - # The framework parent defaults to --release 25; JDK 21 cannot target it, - # so the LTS leg activates the framework's -Pjava21 profile (release 21). - run: mvn -B -ntp -f samples/lumen-lending/pom.xml ${{ matrix.java == '21' && '-Pjava21' || '' }} verify + # Published framework dependencies target Java 25 bytecode. + run: mvn -B -ntp -f samples/lumen-lending/pom.xml verify book: name: Build the book (EN + ES) @@ -36,11 +35,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@v4 with: distribution: temurin - java-version: 21 + java-version: 25 cache: maven - name: Install WeasyPrint system libraries @@ -54,7 +53,7 @@ jobs: run: | python3 -m venv build/.venv ./build/.venv/bin/python -m pip install --upgrade pip - ./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg + ./build/.venv/bin/pip install -r build/requirements.txt - name: Build the English edition run: ./build/build-book.sh --config book.yaml @@ -65,8 +64,10 @@ jobs: - name: Run the book-tooling tests run: ./build/.venv/bin/python -m pytest tests -q - - name: Verify code listings against the sample reactor - run: ./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending + - name: Verify English and Spanish code listings against the sample reactor + run: | + ./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending + ./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending - name: Guard that all four artifacts exist run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad7af3b..e9d24d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,17 +17,16 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@v4 with: distribution: temurin - java-version: 21 + java-version: 25 cache: maven - name: Release gate — verify the sample reactor - # JDK 21 build → activate the framework's -Pjava21 profile (the parent - # defaults to --release 25, which JDK 21 cannot target). - run: mvn -B -ntp -f samples/lumen-lending/pom.xml -Pjava21 verify + # Published framework dependencies target Java 25 bytecode. + run: mvn -B -ntp -f samples/lumen-lending/pom.xml verify - name: Install WeasyPrint system libraries run: | @@ -40,7 +39,7 @@ jobs: run: | python3 -m venv build/.venv ./build/.venv/bin/python -m pip install --upgrade pip - ./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg + ./build/.venv/bin/pip install -r build/requirements.txt - name: Build the English edition run: ./build/build-book.sh --config book.yaml @@ -48,6 +47,14 @@ jobs: - name: Build the Spanish edition run: ./build/build-book.sh --config book.es.yaml + - name: Run the book-tooling tests + run: ./build/.venv/bin/python -m pytest tests -q + + - name: Verify English and Spanish code listings against the sample reactor + run: | + ./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending + ./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending + - name: Extract release notes from the changelog env: TAG_NAME: ${{ github.ref_name }} @@ -78,6 +85,7 @@ jobs: uses: softprops/action-gh-release@v2 with: body_path: release-notes.md + draft: true files: | dist/firefly-java-by-example.epub dist/firefly-java-by-example.pdf diff --git a/CHANGELOG.md b/CHANGELOG.md index 98cbfd2..0562f9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ section matching a `v*.*.*` tag as the GitHub Release notes. ## [Unreleased] +## [26.09.01] — 2026-09-24 + +### Fixed + +- Wrap ordinary fenced code blocks in PDF and EPUB, matching the named listings, so long lines remain readable. +- Use JDK 25 for the companion application gates, matching the published framework dependencies. +- Install the book-tooling test dependency and pin the renderer dependencies. +- Validate both English and Spanish listings and run the tooling tests before publishing all four download formats. + +The manuscript and companion application content are unchanged from the previous edition. + ## [26.06.01] — 2026-06-17 ### Added — first complete edition (English + Spanish) diff --git a/README.md b/README.md index eb0a76c..fc18899 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The book is a print-grade EPUB + PDF produced by a self-contained Python (WeasyP ```bash # one-time python3 -m venv build/.venv -./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg +./build/.venv/bin/pip install -r build/requirements.txt # build (macOS — uses the DYLD shim for cairo/pango) ./build/run.sh --config book.yaml # English -> dist/firefly-java-by-example.{epub,pdf} @@ -27,16 +27,20 @@ python3 -m venv build/.venv ./build/build-book.sh --config book.yaml ``` -Verify the sample reactor and the listings: +Use JDK 25 for the companion application and verify that `mvn -version` reports that JDK. The published framework dependencies used by this sample target Java 25. + +Verify the sample reactor, book tooling, and both editions’ listings: ```bash mvn -f samples/lumen-lending/pom.xml verify +./build/.venv/bin/python -m pytest tests -q ./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending +./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending ``` ## Releases -Built editions (EN + ES, EPUB + PDF) are attached to each [GitHub Release](../../releases) on a CalVer (`YY.MM.PATCH`) tag. +Built editions (EN + ES, EPUB + PDF) are attached to each [GitHub Release](../../releases) on a CalVer (`YY.MM.PATCH`) tag. The release workflow prepares a draft with all four files; publish the draft after reviewing the rendered editions. ## Scope diff --git a/build/requirements.txt b/build/requirements.txt new file mode 100644 index 0000000..fd80996 --- /dev/null +++ b/build/requirements.txt @@ -0,0 +1,6 @@ +weasyprint==70.0 +markdown==3.10.3 +pygments==2.21.0 +pyyaml==6.0.3 +cairosvg==2.9.1 +pytest==9.1.1 diff --git a/theme/book.css b/theme/book.css index 1b684c9..b9b35d3 100644 --- a/theme/book.css +++ b/theme/book.css @@ -37,7 +37,7 @@ hr{ border:none; border-top:1px solid var(--rule); margin:1.7rem 0; } /* inline code — warm tint, firefly-green text */ code{ background:#f3ecda; color:#2c6e22; padding:.06em .36em; border-radius:4px; font-family:"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; font-size:.85em; - word-break:break-word; } + word-break:break-all; overflow-wrap:anywhere; } /* ============ code listings ============ */ .listing{ margin:1.2rem 0; } @@ -45,13 +45,15 @@ code{ background:#f3ecda; color:#2c6e22; padding:.06em .36em; border-radius:4px; font:600 .72rem/1 "SF Mono","JetBrains Mono",Menlo,monospace; padding:.44rem .72rem; border:1px solid var(--code-border); border-bottom:none; border-radius:8px 8px 0 0; } -pre.code{ +pre.code,.code pre{ margin:0; background:var(--code-bg); border:1px solid var(--code-border); border-radius:0 8px 8px 8px; padding:.85rem 1rem; font-family:"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; font-size:.78rem; line-height:1.62; color:#24292f; - white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; tab-size:4; + white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-all; tab-size:4; } +.code pre{ border-radius:8px; margin:1.2rem 0; } +.code pre code{ font:inherit; padding:0; background:none; color:inherit; } .filetab + pre.code{ border-top-left-radius:0; } .lcap{ font-size:.76rem; color:var(--muted); margin-top:.45rem; font-style:italic; } diff --git a/theme/print.css b/theme/print.css index 6c81b28..c0a1cb3 100644 --- a/theme/print.css +++ b/theme/print.css @@ -30,8 +30,8 @@ h1,h2,h3{ break-after:avoid; } p{ orphans:3; widows:3; } /* nothing may exceed the text column; code wraps instead of clipping */ -img,svg,table,pre.code{ max-width:100%; } -pre.code{ white-space:pre-wrap; overflow-wrap:anywhere; } +img,svg,table,pre.code,.code pre{ max-width:100%; } +pre.code,.code pre{ white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-all; } /* ============ Contents page (print) ============ */ /* start on its own page; suppress the running head (no chtitle here) */