ci: publish prerelease versions#2548
Merged
btaillon-coveo merged 2 commits intoKIT-2017from Nov 11, 2022
Merged
Conversation
btaillon-coveo
commented
Nov 10, 2022
| "package_rollout": { | ||
| "only_consider_changesets_after": "b244fe702d8e96d016a52715e92c8131acfde3ba" | ||
| "only_consider_changesets_after": "b244fe702d8e96d016a52715e92c8131acfde3ba", | ||
| "disabled": $[STOP_AT_DEV] |
Contributor
Author
There was a problem hiding this comment.
The quotation marks are missing here, and it's on purpose. This will be replaced by the variable directly.
Contributor
Author
There was a problem hiding this comment.
If you don't like the syntax error here, I can convert the file to YAML.
btaillon-coveo
commented
Nov 10, 2022
| push: | ||
| branches: | ||
| - master | ||
| - 'prerelease/**' |
Contributor
Author
There was a problem hiding this comment.
btaillon-coveo
commented
Nov 10, 2022
Comment on lines
+1
to
+5
| def parseSemanticVersion(String version) { | ||
| def semanticVersionRegex = /^(((([0-9]+)\.[0-9]+)\.[0-9]+)(?:\-.+)?)$/ | ||
| def (_, prerelease, patch, minor, major) = (version =~ semanticVersionRegex)[0] | ||
| return [major, minor, patch, prerelease] | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Tested this in a repl.
Try executing the following in https://www.jdoodle.com/execute-groovy-online/:
def parseSemanticVersion(String version) {
def semanticVersionRegex = /^(((([0-9]+)\.[0-9]+)\.[0-9]+)(?:\-.+)?)$/
def (_, prerelease, patch, minor, major) = (version =~ semanticVersionRegex)[0]
return [major, minor, patch, prerelease]
}
def printVersion(String version) {
def (major, minor, patch, prerelease) = parseSemanticVersion(version)
println "== ${version} =="
println "Major: ${major}"
println "Minor: ${minor}"
println "Patch: ${patch}"
println "Prerelease: ${prerelease}"
}
printVersion("123.456.789-pre.1")
print "\n"
printVersion("123.456.789")
btaillon-coveo
commented
Nov 10, 2022
| const masterCommitHash = await getHeadCommitHash(); | ||
|
|
||
| if (buildCommitHash !== masterCommitHash) { | ||
| if ((await getHowManyCommitsBehind()) !== 0) { |
Contributor
Author
There was a problem hiding this comment.
I changed the condition here since we now execute this script on more branches than just master.
|
Pull Request Report PR Title ✅ Title follows the conventional commit spec. Bundle Size
|
ThibodeauJF
approved these changes
Nov 10, 2022
Closed
btaillon-coveo
added a commit
that referenced
this pull request
Nov 28, 2022
btaillon-coveo
added a commit
that referenced
this pull request
Nov 28, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://coveord.atlassian.net/browse/KIT-2114
In theory, this PR should cause the following to happen:
prerelease/**should execute the same CI as themasterbranch-pre.#suffix (see conventional-prerelease).alphaNPM tag for any commit that isn't on themasterbranch.package_rolloutfor any commit that isn't on themasterbranch, which will prevent it from ever reachingstgandprd(which are responsible for publishing to the staging CDN, publishing to the prod CDN, updating the NPMbetatag and updating the NPMlatesttag).