|
| 1 | +# Version Update Guide |
| 2 | + |
| 3 | +This document provides a guide on where version numbers need to be updated when releasing a new version of PowerPulse. |
| 4 | + |
| 5 | +## Files to Update |
| 6 | + |
| 7 | +When updating the version of PowerPulse, the following files need to be updated: |
| 8 | + |
| 9 | +1. **Root package.json** |
| 10 | + - Location: `/package.json` |
| 11 | + - Update the `"version"` field |
| 12 | + |
| 13 | +2. **Client package.json** |
| 14 | + - Location: `/client/package.json` |
| 15 | + - Update the `"version"` field |
| 16 | + |
| 17 | +3. **Server package.json** |
| 18 | + - Location: `/server/package.json` |
| 19 | + - Update the `"version"` field |
| 20 | + |
| 21 | +4. **README.md** |
| 22 | + - Location: `/README.md` |
| 23 | + - Update the version badge: `` |
| 24 | + |
| 25 | +## Automatic Version Display |
| 26 | + |
| 27 | +The web UI automatically reads the version from the client's package.json file through the following mechanism: |
| 28 | + |
| 29 | +1. `client/src/config/appConfig.js` imports the version from `client/package.json` |
| 30 | +2. Components like `ApplicationInfo.jsx` and `Footer.jsx` read the version from `appConfig.js` |
| 31 | + |
| 32 | +This means that once you update the version in `client/package.json`, the web UI will automatically display the new version. |
| 33 | + |
| 34 | +## Tests |
| 35 | + |
| 36 | +The test file `client/src/test/example.test.jsx` has been updated to dynamically read the version from `client/package.json` rather than using a hardcoded version number. This ensures that the test will continue to pass when the version is updated. |
| 37 | + |
| 38 | +## CHANGELOG.md |
| 39 | + |
| 40 | +Don't forget to update the CHANGELOG.md file with details about the new version, following the existing format: |
| 41 | + |
| 42 | +```markdown |
| 43 | +## [X.Y.Z] - YYYY-MM-DD |
| 44 | + |
| 45 | +### Added |
| 46 | +- New features |
| 47 | + |
| 48 | +### Changed |
| 49 | +- Changes to existing functionality |
| 50 | + |
| 51 | +### Fixed |
| 52 | +- Bug fixes |
| 53 | + |
| 54 | +### Removed |
| 55 | +- Removed features |
| 56 | +``` |
| 57 | + |
| 58 | +## GitHub Release Process |
| 59 | + |
| 60 | +After updating all version numbers and the CHANGELOG.md, commit the changes and push to the appropriate branch (e.g., `release/vX.Y.Z`). Then create a new release on GitHub with the appropriate tag. |
0 commit comments