Skip to content

Commit f6e8120

Browse files
committed
Gate the style.scss version banner instead of letting it drift
The stylesheet header still said `Version: 2.9.0`, thirteen patch releases behind, because nothing checked it — Omeka reads the version from config/theme.ini and cssnano strips the banner out of the compiled CSS, so the only reader was whoever opened the Sass source and believed it. Correcting the number alone would just restart the drift, so release.yml's version step now covers four files rather than three: a tag that disagrees with the banner fails the release the same way a tag disagreeing with theme.ini does. Two neighbouring lines in the same header were stale for the same reason. `Requires PHP: 7.4` predates composer.json's `^8.1` floor, and the description still called IWAC a "digital archive" — the wording the terminology pass in 6021b84 replaced everywhere it was checked. No compiled output changes; the banner never reached asset/css.
1 parent 2ee51a5 commit f6e8120

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,22 @@ jobs:
3838
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
3939
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
4040
41-
# Three files carry the version; a tag that disagrees with any of them
42-
# ships a theme whose admin screen or citation record lies about itself.
43-
- name: Version must match theme.ini, package.json and CITATION.cff
41+
# Four files carry the version; a tag that disagrees with any of them
42+
# ships a theme whose admin screen, stylesheet header or citation record
43+
# lies about itself. style.scss joined the gate in 2.9.14, having drifted
44+
# unnoticed from 2.9.0 across thirteen releases while it went unchecked.
45+
- name: Version must match theme.ini, package.json, CITATION.cff and style.scss
4446
run: |
4547
WANT="${{ steps.v.outputs.version }}"
4648
INI=$(sed -n 's/^version *= *"\(.*\)"/\1/p' config/theme.ini)
4749
PKG=$(node -p "require('./package.json').version")
4850
CFF=$(sed -n 's/^version: *"\?\([^"]*\)"\?/\1/p' CITATION.cff)
49-
echo "tag=$WANT theme.ini=$INI package.json=$PKG CITATION.cff=$CFF"
51+
SCSS=$(sed -n 's/^Version: *\(.*\)/\1/p' asset/sass/style.scss | tr -d '\r')
52+
echo "tag=$WANT theme.ini=$INI package.json=$PKG CITATION.cff=$CFF style.scss=$SCSS"
5053
test "$INI" = "$WANT" || { echo "::error::config/theme.ini says $INI"; exit 1; }
5154
test "$PKG" = "$WANT" || { echo "::error::package.json says $PKG"; exit 1; }
5255
test "$CFF" = "$WANT" || { echo "::error::CITATION.cff says $CFF"; exit 1; }
56+
test "$SCSS" = "$WANT" || { echo "::error::asset/sass/style.scss says $SCSS"; exit 1; }
5357
5458
- run: npm ci
5559

CITATION.cff

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
#
44
# GitHub reads this file to render the "Cite this repository" button and to
55
# generate APA and BibTeX strings. Keep `version` and `date-released` in step
6-
# with config/theme.ini and package.json — .github/workflows/release.yml fails
7-
# the release if the three disagree with the tag.
6+
# with config/theme.ini, package.json and asset/sass/style.scss —
7+
# .github/workflows/release.yml fails the release if the four disagree with the
8+
# tag.
89
cff-version: 1.2.0
910
message: "If you use this software, please cite it using the metadata below."
1011
title: "IWAC Theme: an Omeka S theme for the Islam West Africa Collection"

asset/sass/style.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Theme Name: IWAC Theme
33
Theme URI: https://github.com/fmadore/IWAC-theme
44
Author: Frédérick Madore
55
Author URI: https://www.frederickmadore.com/
6-
Description: Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital archive
7-
Version: 2.9.0
6+
Description: Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection
7+
Version: 2.9.14
88
Omeka Version Constraint: ^4.2.0
9-
Requires PHP: 7.4
9+
Requires PHP: ^8.1
1010
License: GNU General Public License v3 or later
1111
License URI: LICENSE
1212
Text Domain: iwac-theme

0 commit comments

Comments
 (0)