mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
- Introduced a new command for fetching and validating GitHub issues, allowing users to address issues directly from the command line. - Added a release command to bump the version of the application and build the Electron app, ensuring version consistency across UI and server packages. - Updated package.json files for both UI and server to version 0.7.1, reflecting the latest changes. - Implemented version utility in the server to read the version from package.json, enhancing version management across the application.
2.4 KiB
2.4 KiB
Release Command
Bump the package.json version (major, minor, or patch) and build the Electron app with the new version.
Usage
This command accepts a version bump type as input:
patch- Bump patch version (0.1.0 -> 0.1.1)minor- Bump minor version (0.1.0 -> 0.2.0)major- Bump major version (0.1.0 -> 1.0.0)
Instructions
-
Get the bump type from the user
- The bump type should be provided as an argument (patch, minor, or major)
- If no type is provided, ask the user which type they want
-
Bump the version
- Run the version bump script:
node apps/ui/scripts/bump-version.mjs <type> - This updates both
apps/ui/package.jsonandapps/server/package.jsonwith the new version (keeps them in sync) - Verify the version was updated correctly by checking the output
- Run the version bump script:
-
Build the Electron app
- Run the electron build:
npm run build:electron --workspace=apps/ui - The build process automatically:
- Uses the version from
package.jsonfor artifact names (e.g.,Automaker-1.2.3-x64.zip) - Injects the version into the app via Vite's
__APP_VERSION__constant - Displays the version below the logo in the sidebar
- Uses the version from
- Run the electron build:
-
Verify the release
- Check that the build completed successfully
- Confirm the version appears correctly in the built artifacts
- The version will be displayed in the app UI below the logo
Version Centralization
The version is centralized and synchronized in both apps/ui/package.json and apps/server/package.json:
- Electron builds: Automatically read from
apps/ui/package.jsonvia electron-builder's${version}variable inartifactName - App display: Injected at build time via Vite's
defineconfig as__APP_VERSION__constant (defined inapps/ui/vite.config.mts) - Server API: Read from
apps/server/package.jsonviaapps/server/src/lib/version.tsutility (used in health check endpoints) - Type safety: Defined in
apps/ui/src/vite-env.d.tsasdeclare const __APP_VERSION__: string
This ensures consistency across:
- Build artifact names (e.g.,
Automaker-1.2.3-x64.zip) - App UI display (shown as
v1.2.3below the logo inapps/ui/src/components/layout/sidebar/components/automaker-logo.tsx) - Server health endpoints (
/and/detailed) - Package metadata (both UI and server packages stay in sync)