Skip to content

Add alpha to version #1052

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

Merged
merged 1 commit into from
Nov 3, 2020
Merged

Add alpha to version #1052

merged 1 commit into from
Nov 3, 2020

Conversation

silvanocerza
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Updates version command.

  • What is the current behavior?

Alpha is not specified when printing version.

  • What is the new behavior?

Calling version command specifies that we're in alpha.
Example: arduino-cli alpha Version: 0.0.0-git Commit: 83abde23

  • Does this PR introduce a breaking change?

No.

  • Other information:

None.

See how to contribute

@silvanocerza silvanocerza added the topic: documentation Related to documentation for the project label Nov 2, 2020
@silvanocerza silvanocerza requested a review from ubidefeo November 2, 2020 13:29
@silvanocerza silvanocerza self-assigned this Nov 2, 2020
@cmaglie
Copy link
Member

cmaglie commented Nov 3, 2020

$ ./arduino-cli version
arduino-cli alpha Version: 0.0.0-git Commit: 
$ ./arduino-cli version --format json
{
  "Application": "arduino-cli",
  "VersionString": "0.0.0-git",
  "Commit": ""
}

what about adding a field like "Status": "alpha"?
We may change it to beta and stable as it goes.

@silvanocerza
Copy link
Contributor Author

$ ./arduino-cli version
arduino-cli alpha Version: 0.0.0-git Commit: 
$ ./arduino-cli version --format json
{
  "Application": "arduino-cli",
  "VersionString": "0.0.0-git",
  "Commit": ""
}

what about adding a field like "Status": "alpha"?
We may change it to beta and stable as it goes.

Right! Didn't think about the JSON output.

@ubidefeo
Copy link

ubidefeo commented Nov 3, 2020

@cmaglie @silvanocerza
doesn't hurt :)

@silvanocerza silvanocerza force-pushed the scerza/set-alpha-version branch from 5cd397e to af32a06 Compare November 3, 2020 11:17
@per1234
Copy link
Contributor

per1234 commented Nov 3, 2020

What do you think about programmatically interpreting status from the version, according to semver? Something like:

  • 0.14.0-rc2: alpha, pre-release
  • 0.14.0: alpha
  • 1.0.0-rc4: stable, pre-release
  • 1.0.0: stable

It's mostly the stable pre-release where I think this would be important, because it would be strange to mark a pre-release as "stable". So not necessarily something to do right now, but maybe worth considering.

Ideally, there would be a different status for the nightly/test builds.

@kittaakos
Copy link
Contributor

  • 0.14.0-rc2: alpha, pre-release
  • 0.14.0: alpha

What semver will indicate the Beta state?

@per1234
Copy link
Contributor

per1234 commented Nov 3, 2020

AFAIK, there is no concept of alpha/beta in semver. There is only unstable (0.y.z) and stable. So the switch from alpha to beta would just be a matter of manually changing the string whenever that point is deemed to have been reached. With the multi-word status approach, the switch from "beta" to "stable" would only happen once, so that might as well be done manually as well.

It's with the non-release versions that the programmatical status determination becomes useful, since it would not make sense to do that manually.

@silvanocerza
Copy link
Contributor Author

Actually there is, see this: https://semver.org/#spec-item-9
We only use X.Y.Z though so it wouldn't work I think.

@silvanocerza silvanocerza merged commit 5887b1a into master Nov 3, 2020
@silvanocerza silvanocerza deleted the scerza/set-alpha-version branch November 3, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants