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

feat: supports “prerelease” versions #271

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

xufulin1994
Copy link
Contributor

Context:
The VMA app uses the python semver package that supports “prerelease” versions, as well as the usual Major.Minor.Patch. The semver format goes something like Major.Minor.Patch[-prerelease_id.#] where prerelease_id is a text string - for us it’s “dev” for all of the intermediate versions we build and deploy to our DEV environment and “hotfix” for any intermediate versions that we might need to create in our PROD environment because our DEV environment has diverged too far from PROD.

@xufulin1994 xufulin1994 added the change/standard Trivial / minor changes that are low-impact, low risk label Mar 21, 2024
@xufulin1994 xufulin1994 requested a review from a team as a code owner March 21, 2024 01:19
@ops-github-DU4JOAWE
Copy link

This change is Reviewable

@@ -35,7 +35,7 @@ description = "\"" _ inner:(!"\"" i:. {return i})* "\"" {
}

// version
semver = semver:([0-9]+ "." [0-9]+ "." [0-9]+) { return semver.flat().join(""); }
semver = semver:([0-9]+ "." [0-9]+ "." [0-9]+ ("-" [a-zA-Z0-9.-]+)?) { return semver.flat().flat().join(""); }
Copy link
Contributor

Choose a reason for hiding this comment

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

what a ugly flat here.
The flat() method of Array can specific a depth as you want.
flat(2), flat(Infinity)

@yanan-xu
Copy link
Contributor

And please take a test on the api-specs to see if the config/*.json are working well with this format of version definition.

@yanan-xu
Copy link
Contributor

  1. upgrade the Reslang version itself
  2. add some documentation for it if necessary

Copy link
Contributor

@yanan-xu yanan-xu left a comment

Choose a reason for hiding this comment

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

lgtm

@xufulin1994 xufulin1994 merged commit 7e98d1f into master Mar 27, 2024
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the OC-50119-prerelease-version branch March 27, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change/standard Trivial / minor changes that are low-impact, low risk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants