Parcourir la source

Document the release / version-bump process in CLAUDE.md

Add a Release Process section listing every place the version must be
bumped, and clarifying that the version-stamped asset filenames are
generated automatically at runtime (gitignored, never renamed or
committed by hand).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dalibor Votruba il y a 1 mois
Parent
commit
beb4a570fe
1 fichiers modifiés avec 23 ajouts et 0 suppressions
  1. 23 0
      studiou-wc-product-cat-manage/CLAUDE.md

+ 23 - 0
studiou-wc-product-cat-manage/CLAUDE.md

@@ -205,6 +205,29 @@ STUDIOU_WCPCM_PLUGIN_URL     // Plugin URL
 STUDIOU_WCPCM_PLUGIN_BASENAME // Plugin basename
 ```
 
+### Release Process (version bump)
+
+On every release, bump the version in **all** of these places (keep them identical):
+
+1. `studiou-wc-product-cat-manage.php` — the `Version:` plugin header **and** the `STUDIOU_WCPCM_VERSION` constant
+2. `CLAUDE.md` — the **Current Version** line at the top
+3. `readme.md` — the `**Version: X.Y.Z**` line and a new `### Version X.Y.Z` changelog entry
+4. `assets/js/admin.js` — the `console.log('STUDIOU WC: Admin script loaded vX.Y.Z')` banner
+5. `languages/*.po` — the `Project-Id-Version` header (optional but preferred)
+
+#### Asset file renaming — automatic, do NOT do it by hand
+
+Admin CSS/JS are served under **version-stamped filenames** (`assets/js/admin-X.Y.Z.js`, `assets/css/admin-X.Y.Z.css`) so cache busting works on hosts that strip the `?ver=` query string (e.g. studiou.cz).
+
+- The renaming is handled at runtime by `get_cache_busted_asset_url()` in the main plugin file. It copies the source `admin.js` / `admin.css` to a versioned filename built from `STUDIOU_WCPCM_VERSION`, refreshes it whenever the source changes, and deletes stale copies.
+- **Always edit the source files** `assets/js/admin.js` and `assets/css/admin.css` — never the `admin-X.Y.Z.*` copies.
+- The `admin-X.Y.Z.*` copies are **generated build artifacts**: they are `.gitignore`d and must not be committed.
+- After bumping `STUDIOU_WCPCM_VERSION`, the new versioned filenames are produced automatically on the next admin page load — no manual file renaming is required.
+
+#### Translations
+
+After changing any translatable string, update `languages/studiou-wc-product-cat-manage.po` and `languages/studiou-wc-product-cat-manage-cs_CZ.po`, then recompile `languages/studiou-wc-product-cat-manage-cs_CZ.mo` with `msgfmt`.
+
 ### Admin Menu Structure
 
 All pages are added under **Products** menu: