-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementNew feature requests or enhancements.New feature requests or enhancements.versioningIssue or PRs related to version controlIssue or PRs related to version control
Description
Currently, Clipper relies solely on Git tags to determine the version displayed using the -v flag. While this works well for production builds, it's not ideal for development environments where the codebase might not always be tagged.
This enhancement aims to provide a more informative and user-friendly approach to version management.
Proposed Changes:
- Development Version:
- Introduce a default "dev" version string (e.g., "v0.0.0-dev") that is displayed when the code is run directly without being built (e.g.,
go run main.go). - Consider appending a timestamp or commit hash to the "dev" version for precise track of development builds.
- Introduce a default "dev" version string (e.g., "v0.0.0-dev") that is displayed when the code is run directly without being built (e.g.,
- Build Version:
- During the build process, continue using Git tags to determine the version if available.
- If no tag is found, use a fallback version string (e.g., "v0.0.0-unreleased") to indicate that the build is not associated with a specific release.
- Display Logic:
- Refactor the code to conditionally display the appropriate version based on whether the tool is running from a built binary or in development mode.
Goals:
- Clarity: Provide clear and distinct version information to users, differentiating between development and production builds.
- Flexibility: Allow developers to easily identify the specific version of the code they are running during development.
- Maintainability: Make version management more robust and adaptable to different workflows.
Additional Considerations:
- Configuration: Explore options to allow users to customize the development version string or override the default behavior.
- Version Format: Decide on a standardized format for development versions (e.g.,
vX.Y.Z-dev+timestamp) to ensure consistency.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature requests or enhancements.New feature requests or enhancements.versioningIssue or PRs related to version controlIssue or PRs related to version control