Native Windows Applications and Games
Use Case: Native Windows Applications and Games Versioning with Versioning Tools API
Context
In native Windows application and game development, managing versions is critical for tracking changes, distributing updates, and maintaining consistency across releases. This use case illustrates how a developer can use the Versioning Tools API to automate versioning for native Windows applications and games. The process involves retrieving the next version identifier, updating version information locally, tagging the repository, and preparing for deployment.
Scenario
A developer has finished adding a new feature to a native Windows application or game. To prepare for release, the developer needs to:
Retrieve the next semantic version from the Versioning Tools API.
Update the application’s version information in the local codebase.
Tag the version in the version control system (Git).
Prepare the application or game for deployment.
Step-by-Step Guide
1. Retrieve the Next Version Identifier
The developer first needs to obtain the next semantic version from the Versioning Tools API.
Command:
Explanation:
myWindowsAppOrGame
: Replace with your service ID, representing the Windows application or game.YOUR_API_KEY
: Replace with your API key.
Response:
The response provides the next version number, for example, 1.5.0
.
2. Update the Application’s Version Information
Update the application’s version information in the local codebase. The approach will vary depending on how versioning is managed in the application.
For .NET Applications:
Update
AssemblyInfo.cs
:Locate
AssemblyInfo.cs
file, typically found in theProperties
folder of your project.Update
AssemblyVersion
andAssemblyFileVersion
attributes:
Explanation:
AssemblyVersion
: Specifies the version of the assembly being attributed.AssemblyFileVersion
: Specifies the file version of the assembly.
For Standalone Executable or Game Builds:
Update Version Information in Configuration Files:
If version information is maintained in configuration files, such as
.ini
,.xml
, or other custom files, update the version information accordingly.
Explanation:
version
: The new version number for the build.
3. Tag the Version in Git
After updating the local codebase, tag the version in the Git repository.
Command:
Explanation:
v1.5.0
: The version number received from the API.-m "Release version 1.5.0"
: A message describing the tag.
4. Push the Tag to the Remote Repository
Push the new tag to the remote repository.
Command:
Explanation:
origin
: The name of the remote repository.v1.5.0
: The tag being pushed.
5. Prepare for Deployment
Prepare the application or game for deployment. This step involves:
Build Artifacts:
Generate the build artifacts (executables, installers, etc.) with the updated version.
Documentation:
Update any release notes or changelogs to reflect the new version.
Deployment:
Deploy the updated application or game to the appropriate distribution channels (e.g., internal distribution systems, public download sites).
Example Workflow
Here is an example workflow a developer might follow:
Complete Development:
Finalize coding and ensure all tests pass.
Retrieve the Next Version:
Update Version Information:
For .NET applications, update
AssemblyInfo.cs
.For standalone executables or games, update configuration files.
Tag the Repository:
Push the Tag:
Prepare for Deployment:
Build the application or game and update deployment documentation.
Last updated