Microservice/Fatservice
Use Case: High Code Versioning with Versioning Tools API
Context
In a high-code development environment, managing versioning manually can be cumbersome and error-prone. Automating version management can greatly improve efficiency and consistency. This use case illustrates how a developer can use the Versioning Tools API to automate versioning locally, ensuring that each new build or release has a properly managed semantic version.
Scenario
A developer is working on a feature branch for a high-code application. After completing the feature, the developer needs to:
Retrieve the next semantic version from the Versioning Tools API.
Tag the local Git repository with this new version.
Push the new tag to the remote repository.
Step-by-Step Guide
1. Retrieve the Next Version Identifier
The developer will first need to get the next semantic version for their service. This can be done using the Versioning Tools API.
Command:
Explanation:
myServiceId
: Replace with your actual service ID.YOUR_API_KEY
: Replace with your API key.
Response:
The response provides the next semantic version, which in this case is 1.2.0
.
2. Tag the Local Git Repository
With the new version obtained, the developer can now tag the local repository.
Command:
Explanation:
v1.2.0
: The version received from the API.-m "Release version 1.2.0"
: A message describing the tag.
3. Push the Tag to the Remote Repository
Finally, the developer needs to push the new tag to the remote repository to make it available to the team and other environments.
Command:
Explanation:
origin
: The name of the remote repository.v1.2.0
: The tag being pushed.
Example Workflow
Here’s an example workflow that a developer might follow:
Complete Feature Development:
Finish coding and ensure all tests pass.
Retrieve Next Version:
Tag the Repository:
Push the Tag:
Document Changes:
Update any relevant documentation or release notes with the new version information.
Last updated