Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
f9fd5bd4
Unverified
Commit
f9fd5bd4
authored
3 years ago
by
Paweł Krupa
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1229 from paulfantom/new-version-only
scripts: use newer version when generating
parents
ad63d6bb
654aa9bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/generate-versions.sh
+10
-3
10 additions, 3 deletions
scripts/generate-versions.sh
with
10 additions
and
3 deletions
scripts/generate-versions.sh
+
10
−
3
View file @
f9fd5bd4
...
...
@@ -23,12 +23,19 @@ get_current_version() {
get_version
()
{
component
=
"
${
1
}
"
v
=
"
$(
get_latest_version
"
${
component
}
"
)
"
component
=
"
$(
convert_to_camel_case
"
$(
echo
"
${
component
}
"
|
sed
's/^.*\///'
)
"
)
"
cv
=
"
$(
get_current_version
"
${
component
}
"
)
"
# Advanced AI heurestics to filter out common patterns suggesting new version is not stable /s
if
[[
"
$v
"
==
""
]]
||
[[
"
$v
"
==
*
"alpha"
*
]]
||
[[
"
$v
"
==
*
"beta"
*
]]
||
[[
"
$v
"
==
*
"rc"
*
]]
||
[[
"
$v
"
==
*
"helm"
*
]]
;
then
component
=
"
$(
convert_to_camel_case
"
$(
echo
"
${
component
}
"
|
sed
's/^.*\///'
)
"
)
"
v
=
"
$(
get_current_version
"
${
component
}
"
)
"
echo
"
$cv
"
return
fi
# Use higher version from new version and current version
v
=
$(
printf
'%s\n'
"
$v
"
"
$cv
"
|
sort
-r
|
head
-n1
)
echo
"
$v
"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment