diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fdea6a5..babade2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,23 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > **This CHANGELOG is automatically generated and maintained by [python-semantic-release](https://github.com/python-semantic-release/python-semantic-release). Do not edit it manually.** > New entries are prepended automatically on every merge to `main` that triggers a version bump. ---- - -## [Unreleased] - -### Fixed -- Fixed CHANGELOG.md not being updated by semantic-release (`autoescape = true` Jinja2 bug) -- Added explicit `changelog_file`, `mode = "update"`, and `output_format = "md"` to semantic-release config -- Added fallback `semantic-release changelog` step in release workflow for safety - -### Documentation -- Added Documentation-First Development section to CONTRIBUTING.md and AGENTIC_CODING.md -- Fixed README.md quick-start commands (`cd DocuElevate`, `cp .env.demo .env`) -- Added note to README.md screenshots section indicating they may lag the current UI -- Updated TODO.md to reflect current version (v0.40.0) and completed tasks -- Retroactively populated CHANGELOG.md with all post-v0.5.0 changes - ---- + ## [0.40.0] - 2026-02-23 diff --git a/pyproject.toml b/pyproject.toml index f360d63a..085bf3d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ match = "main" prerelease = false [tool.semantic_release.changelog] -changelog_file = "CHANGELOG.md" mode = "update" exclude_commit_patterns = [ "^chore\\(release\\):", diff --git a/scripts/generate_build_metadata.sh b/scripts/generate_build_metadata.sh index d4e7f1b2..6639b57e 100755 --- a/scripts/generate_build_metadata.sh +++ b/scripts/generate_build_metadata.sh @@ -55,31 +55,19 @@ else GIT_BRANCH="unknown" fi -# Read VERSION file -if [ -f "VERSION" ]; then +# Update VERSION file: prefer PSR's NEW_VERSION env var, then existing file +if [ -n "${NEW_VERSION}" ]; then + echo "${NEW_VERSION}" > VERSION + VERSION="${NEW_VERSION}" + echo "✓ VERSION (from NEW_VERSION env): ${VERSION}" +elif [ -f "VERSION" ]; then VERSION=$(cat VERSION | tr -d '\n') echo "✓ VERSION (from file): ${VERSION}" else - echo "⚠ Warning: VERSION file not found" + echo "⚠ Warning: VERSION file not found and NEW_VERSION not set" VERSION="unknown" fi -# Try to derive version from the latest git tag (semantic-release creates vX.Y.Z tags) -if git rev-parse --git-dir > /dev/null 2>&1; then - LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") - if [ -n "${LATEST_TAG}" ]; then - # Strip the 'v' prefix from the tag (e.g., v0.9.1 -> 0.9.1) - TAG_VERSION="${LATEST_TAG#v}" - if [ "${TAG_VERSION}" != "${VERSION}" ]; then - echo "⚠ VERSION file (${VERSION}) is out of sync with latest tag (${TAG_VERSION})" - echo " Updating VERSION file to ${TAG_VERSION}" - echo "${TAG_VERSION}" > VERSION - VERSION="${TAG_VERSION}" - echo "✓ VERSION (updated from tag): ${VERSION}" - fi - fi -fi - # Generate RUNTIME_INFO with combined metadata cat > RUNTIME_INFO << EOF DocuElevate Build Information