This system automatically synchronizes version numbers across multiple project files to save you from manually updating each file when you increment the version.
- The system extracts the latest version number from
Package/README.md - It then updates the version in:
GalacticScale3.csproj(in the<Version>tag)thunderstore.toml(in theversionNumberfield)Bootstrap.cs(in the BepInPlugin attribute)
update-version.ps1: The main script that performs the version extraction and updatingsync-version.ps1: A helper script that can be called from other build processesbuild.ps1: An example build script that synchronizes versions before building
To manually synchronize all version numbers from README.md:
./update-version.ps1To build your project with automatic version synchronization:
./build.ps1 # For Release build
./build.ps1 debug # For Debug buildThe script expects the version in README.md to be in the format:
- Version X.Y.Z - Description of changes
Where X.Y.Z is the semantic version (e.g., 2.72.3).
- Always update the version in
README.mdfirst - The script assumes all files are in the project root directory
- Make sure the scripts have execution permissions (
chmod +x *.ps1on Unix-based systems)
If the script fails to find the version in README.md, ensure:
- The version follows the expected format:
- Version X.Y.Z - - The path to
README.mdis correct (Package/README.md) - The file can be read by the current user