feat: add version variable and tie update to only outdated version #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
cocommit
CLI tool, focusing on adding version tracking and update checking functionality. The most important changes include adding a version flag to display the current version, modifying the build process to include version information, and implementing update checking against the latest GitHub release.Version Tracking and Display:
src/cmd/root.go
: Added aCoco_Version
variable and a--version
flag to display the current version of thecocommit
CLI tool. [1] [2] [3]Build Process Modifications:
ci/build_test_release.go
: Modified the build process to include version information by adding theCoco_Version
environment variable and using-ldflags
to set the version in the build output. [1] [2] [3]Update Checking:
src/cmd/update.go
: Added functionality to check the latest release version on GitHub and compare it with the current version. If an update is available, the user is prompted to proceed with the update. [1] [2] [3] [4]Code Cleanup:
src/main.go
: Removed outdated comments and metadata from the file header.resolves #46