-
Notifications
You must be signed in to change notification settings - Fork 35
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
ci: publish prerelease versions #2548
Conversation
@@ -190,7 +190,8 @@ | |||
"no_endpoint": true | |||
}, | |||
"package_rollout": { | |||
"only_consider_changesets_after": "b244fe702d8e96d016a52715e92c8131acfde3ba" | |||
"only_consider_changesets_after": "b244fe702d8e96d016a52715e92c8131acfde3ba", | |||
"disabled": $[STOP_AT_DEV] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quotation marks are missing here, and it's on purpose. This will be replaced by the variable directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't like the syntax error here, I can convert the file to YAML.
@@ -3,6 +3,7 @@ on: | |||
push: | |||
branches: | |||
- master | |||
- 'prerelease/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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")
const masterCommitHash = await getHeadCommitHash(); | ||
|
||
if (buildCommitHash !== masterCommitHash) { | ||
if ((await getHowManyCommitsBehind()) !== 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
https://coveord.atlassian.net/browse/KIT-2114
In theory, this PR should cause the following to happen:
prerelease/**
should execute the same CI as themaster
branch-pre.#
suffix (see conventional-prerelease).alpha
NPM tag for any commit that isn't on themaster
branch.package_rollout
for any commit that isn't on themaster
branch, which will prevent it from ever reachingstg
andprd
(which are responsible for publishing to the staging CDN, publishing to the prod CDN, updating the NPMbeta
tag and updating the NPMlatest
tag).