Skip to content

Conversation

@arabold
Copy link
Owner

@arabold arabold commented Nov 22, 2025

Inject the correct application version at build time to ensure the version number is properly displayed in the Web UI and when running the server. Update dependencies and modify the build configuration to support this change.

Fixes #264

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes version propagation in release builds by injecting the application version at build time through Vite's define mechanism, replacing the previous runtime approach of reading package.json. The changes also include dependency updates for various packages.

Key Changes:

  • Replaced runtime file reading with build-time version injection via Vite configuration
  • Updated version references across CLI, AppServer, and Layout components to use injected __APP_VERSION__
  • Modified CI/CD workflow to run a dry-run semantic release to determine version before building
  • Updated multiple dependencies to latest versions

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vite.config.ts Added __APP_VERSION__ definition that injects version from APP_VERSION env var or package.json
src/types/build-env.d.ts Added type declaration for __APP_VERSION__ global constant
src/web/components/Layout.tsx Removed runtime file reading logic; now uses injected __APP_VERSION__ constant
src/cli/index.ts Replaced packageJson.version imports with __APP_VERSION__ constant
src/app/AppServer.ts Replaced packageJson.version imports with __APP_VERSION__ constant
.github/workflows/release.yml Added dry-run semantic release step to determine version before build
package.json Updated dependencies to newer versions
package-lock.json Lockfile updates corresponding to dependency changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arabold arabold force-pushed the fix/264-version-info branch 2 times, most recently from 58572fa to 8454cf6 Compare November 22, 2025 15:54
- Updated various dependencies in package.json to their latest versions.
- Replaced direct import of package.json for versioning with build-time injected variable __APP_VERSION__ in AppServer.ts, index.ts, and Layout.tsx.
- Added declaration for __APP_VERSION__ in build-env.d.ts.
- Modified vite.config.ts to inject __APP_VERSION__ from environment variables during the build process.

Closes Version number isn't properly propagated in release version

Fixes #264
@arabold arabold force-pushed the fix/264-version-info branch from 8454cf6 to 6f36709 Compare November 22, 2025 16:11
@arabold arabold merged commit 77cea88 into main Nov 22, 2025
3 checks passed
@arabold arabold deleted the fix/264-version-info branch November 22, 2025 16:18
@github-actions
Copy link

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version number isn't properly propagated in release version

2 participants