Skip to content

Conversation

@jaevans
Copy link
Owner

@jaevans jaevans commented May 6, 2025

  • compare compares two symvers and return 0 if the first is less than the second, 1 if they are equal, and 2 if the first is greater than the second.
  • released Returns 0 if the if the given version is a release version, and 1 if it is not.

- `compare` compares two symvers and return 0 if the first is less than the second, 1 if they are equal, and 2 if the first is greater than the second.
- `released` Returns 0 if the if the given version is a release version, and 1 if it is not.
@jaevans jaevans requested a review from Copilot May 6, 2025 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces two new CLI commands—"compare" and "released"—to provide script utilities for semantic versioning by using exit codes for status indication.

  • Added CompareVersions and IsReleased functions with associated tests in cmd/script_test.go.
  • Integrated new commands into the CLI via scriptCmd in cmd/script.go and registered them in cmd/root.go.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/script_test.go Includes test cases for comparing and verifying semantic versions.
cmd/script.go Implements CompareVersions and IsReleased functions along with compare and released subcommands.
cmd/root.go Registers the new script command with the root command.

jaevans and others added 2 commits May 6, 2025 14:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jaevans jaevans self-assigned this May 6, 2025
@jaevans jaevans merged commit b64e1a4 into main May 6, 2025
1 check passed
@jaevans jaevans deleted the add-script-functions branch May 6, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants