Conversation
- Add scripts/compute-version.sh for Git-based version derivation - Add cmake/GitVersion.cmake module to replace hardcoded CMake version - Update CMakeLists.txt to use GitVersion module with fallback - Update all CI workflows with fetch-depth: 0 and version computation - Update artifact names to include VERSION in all workflows - Update setup.py to prefer VERSION env var for Python package version Co-authored-by: frankslin <748873+frankslin@users.noreply.github.com> Agent-Logs-Url: https://github.com/BYVoid/OpenCC/sessions/f2246182-75cf-48a2-99e4-a22a9da2ad97
… docs Co-authored-by: frankslin <748873+frankslin@users.noreply.github.com> Agent-Logs-Url: https://github.com/BYVoid/OpenCC/sessions/f2246182-75cf-48a2-99e4-a22a9da2ad97
…ivergence
- Rename VERSION→PYVER loop variable in release-pypi-linux.sh and
release-pypi-macos.sh to avoid overwriting the package version env var
- Pass -e VERSION=${VERSION} into Docker containers in release-pypi.yml
and python.yml so the computed version reaches setup.py
- Align no-tag fallback in compute-version.sh with cmake/GitVersion.cmake
to output v1.2.1+g<sha> instead of bare g<sha>
Agent-Logs-Url: https://github.com/BYVoid/OpenCC/sessions/bdd95762-bf18-4b99-b239-6fbc9017796d
Co-authored-by: frankslin <748873+frankslin@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
frankslin
March 27, 2026 01:26
View session
frankslin
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unified versioning mechanism introduced three bugs: (1) release scripts use
VERSIONas a loop variable, clobbering the package version env var so wheels get stamped with Python versions like3.14, (2) Linux Docker builds never receive the computedVERSION, and since the hardcodedOPENCC_VERSION_*constants were removed fromCMakeLists.txt,setup.py's fallback silently produces1.0.0, (3) the no-tag fallback disagrees betweencompute-version.sh(g<sha>) andGitVersion.cmake(1.2.1+g<sha>).Loop variable collision
VERSION→PYVERinrelease-pypi-linux.shandrelease-pypi-macos.shDocker VERSION passthrough
-e VERSION=${VERSION}todocker runinrelease-pypi.ymlandpython.ymlNo-tag fallback alignment
FALLBACK_VERSION="1.2.1"tocompute-version.sh(matchingcmake/GitVersion.cmake) so the no-tag case outputsv1.2.1+g<sha>instead of bareg<sha>