From ed91f98af688d4174a815a361f4bfa4335b9f29a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 13:32:26 +0000 Subject: [PATCH 1/2] Version all packages together and tag releases Every package moves to 1.2.0 and shares one version from now on. Releases are vX.Y.Z tags on the whole repository, the README URLs pin #v1.2.0, and a Release Tag Check workflow fails a tag or package.json change whose versions disagree. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01PMvSo4rSeQvPWUD4dRAq31 --- .github/workflows/release-tag-check.yml | 49 +++++++++++++++++++ CHANGELOG.md | 4 ++ CLAUDE.md | 5 ++ .../com.danielnoam.buildtool/package.json | 2 +- .../com.danielnoam.components/package.json | 4 +- .../com.danielnoam.helpfuleditor/package.json | 2 +- Packages/com.danielnoam.systems/package.json | 6 +-- .../com.danielnoam.utilities/package.json | 2 +- Packages/packages-lock.json | 6 +-- README.md | 16 ++++-- 10 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/release-tag-check.yml diff --git a/.github/workflows/release-tag-check.yml b/.github/workflows/release-tag-check.yml new file mode 100644 index 00000000..967493d7 --- /dev/null +++ b/.github/workflows/release-tag-check.yml @@ -0,0 +1,49 @@ +name: Release Tag Check + +on: + push: + tags: + - "v*" + pull_request: + paths: + - "Packages/com.danielnoam.*/package.json" + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check package versions + shell: python + run: | + import glob, json, os, sys + + packages = {} + for path in sorted(glob.glob("Packages/com.danielnoam.*/package.json")): + with open(path, encoding="utf-8") as f: + data = json.load(f) + packages[data["name"]] = data + + errors = [] + versions = {data["version"] for data in packages.values()} + if len(versions) != 1: + errors.append("Packages have different versions: " + ", ".join(f"{n} {d['version']}" for n, d in packages.items())) + version = sorted(versions)[0] + + for name, data in packages.items(): + for dep, dep_version in data.get("dependencies", {}).items(): + if dep in packages and dep_version != packages[dep]["version"]: + errors.append(f"{name} depends on {dep} {dep_version}, but {dep} is {packages[dep]['version']}") + + ref = os.environ.get("GITHUB_REF", "") + if ref.startswith("refs/tags/"): + tag = ref[len("refs/tags/"):] + if tag != f"v{version}": + errors.append(f"Tag {tag} does not match package version {version}") + + for error in errors: + print(f"::error::{error}") + if errors: + sys.exit(1) + print(f"All {len(packages)} packages are at {version}") diff --git a/CHANGELOG.md b/CHANGELOG.md index a25c0869..33f20b38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## [Unreleased] +## [1.2.0] - 2026-10-26 + ### Added +- Releases are tagged. Every package shares one version and one `vX.Y.Z` tag, so a project pins the whole suite to the same commit. - `DNExtensionsMenu.Root` (`DNExtensions/`), the one place menu items are rooted. Utilities holds the public one; Helpful Editor and Build Tool keep an internal copy since they depend on nothing. - `com.danielnoam.buildtool`: the build window from ElectroGrid, made generic. Builds Android and Windows from Build Profiles, runs `[BuildCheck]` project checks, signs Android releases with a keystore kept off the repository, and uploads to a folder, GitHub Releases, itch.io (butler) and Steam (SteamPipe). Build and Settings tabs; per-machine settings stay on each computer. - MCP tools for AI agents: `MCP/Editor` assemblies in every package, built only when `com.unity.pipeline` is installed, exposing Game View capture, inspector buttons, AutoGet population, Quick Navigation history, scene notes, audio IDs, object pools and ScriptableObject values/events as `unity` CLI commands and MCP tools. @@ -11,6 +14,7 @@ - Game View recording takes per-take options (`GameViewRecordingOptions`) that fall back to the Game View settings, and reports where the last take was saved. ### Changed +- All packages are versioned together; each one moved to 1.2.0. - Every DNExtensions editor menu item moved from **Tools → DNExtensions** to its own **DNExtensions** menu in the top bar. ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index 665cd195..fe3516c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,3 +5,8 @@ `DNExtensions.Utilities.DNExtensionsMenu`; a package that depends on nothing (Helpful Editor, Build Tool) keeps its own internal copy in its root namespace. A new package of that kind adds one too. - Project Settings pages stay at `Project/DNExtensions/`, and GameObject create items at `GameObject/DNExtensions/`. +- **Versions** are shared: every package carries the same `version`, and the `com.danielnoam.*` dependency versions match + it. To release, set them all (and the same entries in `Packages/packages-lock.json`) to the new version, move + `[Unreleased]` in CHANGELOG.md into a dated section, update the `#vX.Y.Z` in the README URLs, then tag the merged + commit `vX.Y.Z` and push the tag. Never move or reuse a tag. The Release Tag Check workflow fails a tag that + disagrees with the package versions. diff --git a/Packages/com.danielnoam.buildtool/package.json b/Packages/com.danielnoam.buildtool/package.json index eb4bbc79..f2ded174 100644 --- a/Packages/com.danielnoam.buildtool/package.json +++ b/Packages/com.danielnoam.buildtool/package.json @@ -1,6 +1,6 @@ { "name": "com.danielnoam.buildtool", - "version": "1.0.0", + "version": "1.2.0", "displayName": "DNExtensions Build Tool", "description": "A build window for releasing: builds Android APK and Windows targets from Build Profiles one after another, runs the project's own checks, signs Android releases with a keystore kept off the repository, and uploads to a folder, GitHub Releases, itch.io (butler) and Steam (SteamPipe).\n\nEditor-only. Project setup lives in Assets/Settings/Build/BuildConfig.asset; per-machine folders, keys and logins stay on each computer.", "unity": "6000.0", diff --git a/Packages/com.danielnoam.components/package.json b/Packages/com.danielnoam.components/package.json index 1a822707..c0e18525 100644 --- a/Packages/com.danielnoam.components/package.json +++ b/Packages/com.danielnoam.components/package.json @@ -1,6 +1,6 @@ { "name": "com.danielnoam.components", - "version": "1.0.0", + "version": "1.2.0", "displayName": "DNExtensions Components", "description": "Runtime components built on DNExtensions Utilities: transform effectors, a simple animator, tube renderer, carousel view, fill bar, notes, and other gameplay and UI pieces.\n\nRequires PrimeTween, which is a paid asset and cannot be resolved from a registry — install it into the project separately before adding this package.", "unity": "2022.3", @@ -11,7 +11,7 @@ "gameplay" ], "dependencies": { - "com.danielnoam.utilities": "1.0.0", + "com.danielnoam.utilities": "1.2.0", "com.unity.inputsystem": "1.19.0", "com.unity.ugui": "2.0.0" }, diff --git a/Packages/com.danielnoam.helpfuleditor/package.json b/Packages/com.danielnoam.helpfuleditor/package.json index 787b4d83..5cf96bda 100644 --- a/Packages/com.danielnoam.helpfuleditor/package.json +++ b/Packages/com.danielnoam.helpfuleditor/package.json @@ -1,6 +1,6 @@ { "name": "com.danielnoam.helpfuleditor", - "version": "1.0.0", + "version": "1.2.0", "displayName": "DNExtensions Helpful Editor", "description": "Editor quality-of-life for the Hierarchy, Inspector, Project and Game View windows: zebra striping and tree guides, component strips, component isolation and drag reordering, per-component header buttons, symlinked folder badges, and Game View rulers with guides.\n\nEditor-only and self-contained. Settings live in ProjectSettings/HelpfulEditor/ and are tracked by source control.", "unity": "2022.3", diff --git a/Packages/com.danielnoam.systems/package.json b/Packages/com.danielnoam.systems/package.json index df32baa6..ab884d57 100644 --- a/Packages/com.danielnoam.systems/package.json +++ b/Packages/com.danielnoam.systems/package.json @@ -1,6 +1,6 @@ { "name": "com.danielnoam.systems", - "version": "1.0.0", + "version": "1.2.0", "displayName": "DNExtensions Systems", "description": "Gameplay systems, shaders and effects: audio library and tracks, first person controller, object pooling, menu system, scheduling, grid, radar, radial menu, SDF shapes, springs, damage numbers, controller rumble, and a fullscreen VFX and transition stack.\n\nThe largest and most opinionated package of the suite, and the only one that pulls in URP, Timeline and VFX Graph.\n\nRequires PrimeTween, which is a paid asset and cannot be resolved from a registry — install it into the project separately before adding this package.", "unity": "2022.3", @@ -13,8 +13,8 @@ "shaders" ], "dependencies": { - "com.danielnoam.utilities": "1.0.0", - "com.danielnoam.components": "1.0.0", + "com.danielnoam.utilities": "1.2.0", + "com.danielnoam.components": "1.2.0", "com.unity.cinemachine": "3.1.7", "com.unity.inputsystem": "1.19.0", "com.unity.render-pipelines.universal": "17.5.0", diff --git a/Packages/com.danielnoam.utilities/package.json b/Packages/com.danielnoam.utilities/package.json index 29483a4c..a207ebe1 100644 --- a/Packages/com.danielnoam.utilities/package.json +++ b/Packages/com.danielnoam.utilities/package.json @@ -1,6 +1,6 @@ { "name": "com.danielnoam.utilities", - "version": "1.1.0", + "version": "1.2.0", "displayName": "DNExtensions Utilities", "description": "Inspector and workflow utilities: attribute drawers (AutoGet, Button, conditional display, foldout groups, previews, scene and asset pickers), custom serialized fields (ranged values, optional values, tag/layer/scene fields), a SerializeReference type selector, serialized interfaces, and a set of small editor tools.\n\nThe core of the suite — depends only on Mathematics and uGUI.", "unity": "2022.3", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 6555b58c..89e482eb 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -11,7 +11,7 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.danielnoam.utilities": "1.0.0", + "com.danielnoam.utilities": "1.2.0", "com.unity.inputsystem": "1.19.0", "com.unity.ugui": "2.0.0" } @@ -27,8 +27,8 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.danielnoam.utilities": "1.0.0", - "com.danielnoam.components": "1.0.0", + "com.danielnoam.utilities": "1.2.0", + "com.danielnoam.components": "1.2.0", "com.unity.cinemachine": "3.1.7", "com.unity.inputsystem": "1.19.0", "com.unity.render-pipelines.universal": "17.5.0", diff --git a/README.md b/README.md index 1f039c57..941a1b26 100644 --- a/README.md +++ b/README.md @@ -27,21 +27,27 @@ Adding `systems` to an empty project will fail. Add `utilities` first. ### URLs ``` -https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.helpfuleditor +https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.helpfuleditor#v1.2.0 ``` ``` -https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.buildtool +https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.buildtool#v1.2.0 ``` ``` -https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.utilities +https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.utilities#v1.2.0 ``` ``` -https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.components +https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.components#v1.2.0 ``` ``` -https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.systems +https://github.com/danielnoam/DNExtensions.git?path=/Packages/com.danielnoam.systems#v1.2.0 ``` +### Versions + +Every package shares one version, and each release is a `vX.Y.Z` tag on the whole repository (see [CHANGELOG.md](CHANGELOG.md)). The `#v1.2.0` at the end of each URL pins that release; use the same tag on every DNExtensions package in a project so they all come from the same commit. Leave it off to track `main`. + +The Package Manager does not report new versions of git packages. To update, change the tag on each DNExtensions line in `Packages/manifest.json`. + ### PrimeTween `components` and `systems` require [PrimeTween](https://assetstore.unity.com/packages/tools/animation/primetween-high-performance-animations-and-sequences-252960). It is a paid asset and cannot be resolved from a registry, so it is **not declared as a dependency** — install it into the project yourself before adding either package. Without it, those packages will not compile. From ceded85be6654d35668bed78f0f2056a5af68a83 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 14:21:20 +0000 Subject: [PATCH 2/2] Add a Set Suite Version window for releases DNExtensions > Release > Set Suite Version (project only, not in a package) sets one version on every package.json, the com.danielnoam dependencies, the lock file, the README install URLs and a new dated CHANGELOG section. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01PMvSo4rSeQvPWUD4dRAq31 --- Assets/Editor.meta | 8 ++ Assets/Editor/Release.meta | 8 ++ Assets/Editor/Release/SuiteVersionWindow.cs | 135 ++++++++++++++++++ .../Editor/Release/SuiteVersionWindow.cs.meta | 2 + CLAUDE.md | 3 +- 5 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 Assets/Editor.meta create mode 100644 Assets/Editor/Release.meta create mode 100644 Assets/Editor/Release/SuiteVersionWindow.cs create mode 100644 Assets/Editor/Release/SuiteVersionWindow.cs.meta diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 00000000..c575312d --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 31a23fb00560476095419a4b8a39c13d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Release.meta b/Assets/Editor/Release.meta new file mode 100644 index 00000000..6c57634a --- /dev/null +++ b/Assets/Editor/Release.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 241fba2679c7418b976b07245409efac +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Release/SuiteVersionWindow.cs b/Assets/Editor/Release/SuiteVersionWindow.cs new file mode 100644 index 00000000..d5d76454 --- /dev/null +++ b/Assets/Editor/Release/SuiteVersionWindow.cs @@ -0,0 +1,135 @@ +using System; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using DNExtensions.Utilities; +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEngine; + +namespace DNExtensions.Release +{ + /// + /// Sets one version on every DNExtensions package: each package.json, the com.danielnoam dependencies between them, + /// the lock file, the README install URLs and a new dated CHANGELOG section. Tag the merged commit vX.Y.Z afterwards. + /// + internal class SuiteVersionWindow : EditorWindow + { + private const string PackagePrefix = "com.danielnoam."; + + private static readonly Regex SemVer = new Regex(@"^\d+\.\d+\.\d+$"); + private static readonly Regex VersionLine = new Regex(@"^(\s*""version"":\s*"")([^""]+)("")", RegexOptions.Multiline); + private static readonly Regex DependencyVersion = new Regex(@"(""com\.danielnoam\.[a-z]+"":\s*"")\d+\.\d+\.\d+("")"); + private static readonly Regex ReadmeTag = new Regex(@"(DNExtensions\.git\?path=/Packages/com\.danielnoam\.[a-z]+)#v\d+\.\d+\.\d+"); + + private string _currentVersion; + private string _newVersion; + + private static string ProjectRoot => Directory.GetParent(Application.dataPath).FullName; + private static string PackagesFolder => Path.Combine(ProjectRoot, "Packages"); + + [MenuItem(DNExtensionsMenu.Root + "Release/Set Suite Version")] + public static void ShowWindow() + { + var window = GetWindow(true, "Set Suite Version"); + window.minSize = new Vector2(320f, 130f); + window.maxSize = new Vector2(320f, 130f); + window.ShowUtility(); + } + + private void OnEnable() + { + _currentVersion = ReadCurrentVersion(); + _newVersion = _currentVersion; + } + + private void OnGUI() + { + EditorGUILayout.LabelField("Current", _currentVersion); + _newVersion = EditorGUILayout.TextField("New", _newVersion).Trim(); + + var isValid = SemVer.IsMatch(_newVersion) && _newVersion != _currentVersion; + if (!SemVer.IsMatch(_newVersion)) + { + EditorGUILayout.HelpBox("Use MAJOR.MINOR.PATCH, e.g. 1.3.0.", MessageType.Warning); + } + + using (new EditorGUI.DisabledScope(!isValid)) + { + if (GUILayout.Button("Apply")) + { + Apply(_newVersion); + Close(); + } + } + } + + private static string[] GetPackageJsonPaths() + { + return Directory.GetDirectories(PackagesFolder, PackagePrefix + "*") + .Select(folder => Path.Combine(folder, "package.json")) + .Where(File.Exists) + .OrderBy(path => path) + .ToArray(); + } + + private static string ReadCurrentVersion() + { + var path = GetPackageJsonPaths().FirstOrDefault(); + if (path == null) + { + return "?"; + } + + var match = VersionLine.Match(File.ReadAllText(path)); + return match.Success ? match.Groups[2].Value : "?"; + } + + private static void Apply(string version) + { + foreach (var path in GetPackageJsonPaths()) + { + RewriteFile(path, text => + { + text = VersionLine.Replace(text, "${1}" + version + "${3}", 1); + return DependencyVersion.Replace(text, "${1}" + version + "${2}"); + }); + } + + RewriteFile(Path.Combine(PackagesFolder, "packages-lock.json"), text => DependencyVersion.Replace(text, "${1}" + version + "${2}")); + RewriteFile(Path.Combine(ProjectRoot, "README.md"), text => ReadmeTag.Replace(text, "${1}#v" + version)); + RewriteFile(Path.Combine(ProjectRoot, "CHANGELOG.md"), text => AddChangelogSection(text, version)); + + Client.Resolve(); + Debug.Log($"DNExtensions set to {version}. Commit, merge, then tag the merged commit v{version} and push the tag."); + } + + private static string AddChangelogSection(string text, string version) + { + const string unreleased = "## [Unreleased]"; + if (!text.Contains(unreleased) || text.Contains($"## [{version}]")) + { + return text; + } + + var index = text.IndexOf(unreleased, StringComparison.Ordinal) + unreleased.Length; + return text.Insert(index, $"\n\n## [{version}] - {DateTime.Now:yyyy-MM-dd}"); + } + + private static void RewriteFile(string path, Func rewrite) + { + if (!File.Exists(path)) + { + Debug.LogWarning($"Set Suite Version: {path} not found, skipped."); + return; + } + + var text = File.ReadAllText(path); + var newText = rewrite(text); + if (newText != text) + { + File.WriteAllText(path, newText); + } + } + } +} diff --git a/Assets/Editor/Release/SuiteVersionWindow.cs.meta b/Assets/Editor/Release/SuiteVersionWindow.cs.meta new file mode 100644 index 00000000..700b04db --- /dev/null +++ b/Assets/Editor/Release/SuiteVersionWindow.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ce524c11b96642c5b52133b0db383351 diff --git a/CLAUDE.md b/CLAUDE.md index fe3516c6..4b47540e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,6 +7,7 @@ - Project Settings pages stay at `Project/DNExtensions/`, and GameObject create items at `GameObject/DNExtensions/`. - **Versions** are shared: every package carries the same `version`, and the `com.danielnoam.*` dependency versions match it. To release, set them all (and the same entries in `Packages/packages-lock.json`) to the new version, move - `[Unreleased]` in CHANGELOG.md into a dated section, update the `#vX.Y.Z` in the README URLs, then tag the merged + `[Unreleased]` in CHANGELOG.md into a dated section, update the `#vX.Y.Z` in the README URLs (**DNExtensions → + Release → Set Suite Version** in this project does all of that), then tag the merged commit `vX.Y.Z` and push the tag. Never move or reuse a tag. The Release Tag Check workflow fails a tag that disagrees with the package versions.