Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment package version correctly #21

Merged
merged 1 commit into from
Feb 12, 2020
Merged

Increment package version correctly #21

merged 1 commit into from
Feb 12, 2020

Conversation

alexesprit
Copy link
Contributor

Fixes #20.

@@ -196,24 +196,20 @@ fn (manifest PkgManifest) manipulate_version(@type string, state string) string
else {}
}

if selected_idx > ver_arr.len {
for selected_idx > ver_arr.len-1 {
Copy link
Contributor Author

@alexesprit alexesprit Feb 12, 2020

Choose a reason for hiding this comment

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

Tbh, I don't like this solution. I'd go with displaying an error, if the version does not follow semver format (ver_arr.len is not equal 3 for now). This is preferrable way, as we are supposed to work with semver format in this case.

Alternatively, we can normalize the version to semver (where we have only three version fields). But I'm not sure if it's a proper way to handle invalid version formats.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah... that's when the time semver libraries for V haven't existed yet. Lets merge this for now. I'll integrate your semver library later

@@ -196,24 +196,20 @@ fn (manifest PkgManifest) manipulate_version(@type string, state string) string
else {}
}

if selected_idx > ver_arr.len {
for selected_idx > ver_arr.len-1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah... that's when the time semver libraries for V haven't existed yet. Lets merge this for now. I'll integrate your semver library later

@nedpals nedpals merged commit 96a2b74 into vpkg-project:master Feb 12, 2020
@alexesprit alexesprit deleted the fix-release-command branch February 13, 2020 04:59
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.

release command updates version incorrectly
2 participants