Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
37b07dfe
Commit
37b07dfe
authored
Apr 04, 2017
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support arbitrary alphanumeric strings as prerelease identifiers
parent
3a3dc827
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
release.sh
build/lib/release.sh
+1
-1
common.sh
cluster/common.sh
+4
-4
get-kube.sh
cluster/get-kube.sh
+2
-2
No files found.
build/lib/release.sh
View file @
37b07dfe
...
@@ -45,7 +45,7 @@ readonly RELEASE_DIR="${LOCAL_OUTPUT_ROOT}/release-tars"
...
@@ -45,7 +45,7 @@ readonly RELEASE_DIR="${LOCAL_OUTPUT_ROOT}/release-tars"
# VERSION_COMMITS (e.g. '56')
# VERSION_COMMITS (e.g. '56')
function
kube::release::parse_and_validate_ci_version
()
{
function
kube::release::parse_and_validate_ci_version
()
{
# Accept things like "v1.2.3-alpha.4.56+abcdef12345678" or "v1.2.3-beta.4"
# Accept things like "v1.2.3-alpha.4.56+abcdef12345678" or "v1.2.3-beta.4"
local
-r
version_regex
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
beta|alpha|rc
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[0-9a-f]{7,40})?$"
local
-r
version_regex
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
[a-zA-Z0-9]+
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[0-9a-f]{7,40})?$"
local
-r
version
=
"
${
1
-
}
"
local
-r
version
=
"
${
1
-
}
"
[[
"
${
version
}
"
=
~
${
version_regex
}
]]
||
{
[[
"
${
version
}
"
=
~
${
version_regex
}
]]
||
{
kube::log::error
"Invalid ci version: '
${
version
}
', must match regex
${
version_regex
}
"
kube::log::error
"Invalid ci version: '
${
version
}
', must match regex
${
version_regex
}
"
...
...
cluster/common.sh
View file @
37b07dfe
...
@@ -30,15 +30,15 @@ source "${KUBE_ROOT}/cluster/lib/logging.sh"
...
@@ -30,15 +30,15 @@ source "${KUBE_ROOT}/cluster/lib/logging.sh"
#
#
# NOTE This must match the version_regex in build/common.sh
# NOTE This must match the version_regex in build/common.sh
# kube::release::parse_and_validate_release_version()
# kube::release::parse_and_validate_release_version()
KUBE_RELEASE_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)(-(
beta|alpha|rc
)
\\
.(0|[1-9][0-9]*))?$"
KUBE_RELEASE_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)(-(
[a-zA-Z0-9]+
)
\\
.(0|[1-9][0-9]*))?$"
KUBE_RELEASE_VERSION_DASHED_REGEX
=
"v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)(-(
beta|alpha|rc
)-(0|[1-9][0-9]*))?"
KUBE_RELEASE_VERSION_DASHED_REGEX
=
"v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)(-(
[a-zA-Z0-9]+
)-(0|[1-9][0-9]*))?"
# KUBE_CI_VERSION_REGEX matches things like "v1.2.3-alpha.4.56+abcdefg" This
# KUBE_CI_VERSION_REGEX matches things like "v1.2.3-alpha.4.56+abcdefg" This
#
#
# NOTE This must match the version_regex in build/common.sh
# NOTE This must match the version_regex in build/common.sh
# kube::release::parse_and_validate_ci_version()
# kube::release::parse_and_validate_ci_version()
KUBE_CI_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
beta|alpha|rc
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?$"
KUBE_CI_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
[a-zA-Z0-9]+
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?$"
KUBE_CI_VERSION_DASHED_REGEX
=
"^v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(
beta|alpha|rc
)-(0|[1-9][0-9]*)(-(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?"
KUBE_CI_VERSION_DASHED_REGEX
=
"^v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(
[a-zA-Z0-9]+
)-(0|[1-9][0-9]*)(-(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?"
# Generate kubeconfig data for the created cluster.
# Generate kubeconfig data for the created cluster.
# Assumed vars:
# Assumed vars:
...
...
cluster/get-kube.sh
View file @
37b07dfe
...
@@ -65,8 +65,8 @@ set -o pipefail
...
@@ -65,8 +65,8 @@ set -o pipefail
KUBERNETES_CI_RELEASE_URL
=
"
${
KUBERNETES_CI_RELEASE_URL
:-${
KUBERNETES_RELEASE_URL
:-
https
://dl.k8s.io/ci
}}
"
KUBERNETES_CI_RELEASE_URL
=
"
${
KUBERNETES_CI_RELEASE_URL
:-${
KUBERNETES_RELEASE_URL
:-
https
://dl.k8s.io/ci
}}
"
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_RELEASE_URL
:-
https
://dl.k8s.io
}
"
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_RELEASE_URL
:-
https
://dl.k8s.io
}
"
KUBE_RELEASE_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)(-(
beta|alpha|rc
)
\\
.(0|[1-9][0-9]*))?$"
KUBE_RELEASE_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)(-(
[a-zA-Z0-9]+
)
\\
.(0|[1-9][0-9]*))?$"
KUBE_CI_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
beta|alpha|rc
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?$"
KUBE_CI_VERSION_REGEX
=
"^v(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)
\\
.(0|[1-9][0-9]*)-(
[a-zA-Z0-9]+
)
\\
.(0|[1-9][0-9]*)(
\\
.(0|[1-9][0-9]*)
\\
+[-0-9a-z]*)?$"
# Sets KUBE_VERSION variable if an explicit version number was provided (e.g. "v1.0.6",
# Sets KUBE_VERSION variable if an explicit version number was provided (e.g. "v1.0.6",
# "v1.2.0-alpha.1.881+376438b69c7612") or resolves the "published" version
# "v1.2.0-alpha.1.881+376438b69c7612") or resolves the "published" version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment