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
66a85555
Commit
66a85555
authored
Oct 12, 2016
by
Piotr Skamruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: Fix version generation.
parent
12b13357
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
version.sh
hack/lib/version.sh
+7
-0
No files found.
hack/lib/version.sh
View file @
66a85555
...
@@ -56,7 +56,14 @@ kube::version::get_version_vars() {
...
@@ -56,7 +56,14 @@ kube::version::get_version_vars() {
#
#
# TODO: We continue calling this "git version" because so many
# TODO: We continue calling this "git version" because so many
# downstream consumers are expecting it there.
# downstream consumers are expecting it there.
DASHES_IN_VERSION
=
$(
echo
"
${
KUBE_GIT_VERSION
}
"
|
sed
"s/[^-]//g"
)
if
[[
"
${
DASHES_IN_VERSION
}
"
==
"---"
]]
;
then
# We have distance to subversion (v1.1.0-subversion-1-gCommitHash)
KUBE_GIT_VERSION
=
$(
echo
"
${
KUBE_GIT_VERSION
}
"
|
sed
"s/-
\(
[0-9]
\{
1,
\}\)
-g
\(
[0-9a-f]
\{
14
\}\)
$/
.
\1\+\2
/"
)
KUBE_GIT_VERSION
=
$(
echo
"
${
KUBE_GIT_VERSION
}
"
|
sed
"s/-
\(
[0-9]
\{
1,
\}\)
-g
\(
[0-9a-f]
\{
14
\}\)
$/
.
\1\+\2
/"
)
elif
[[
"
${
DASHES_IN_VERSION
}
"
==
"--"
]]
;
then
# We have distance to base tag (v1.1.0-1-gCommitHash)
KUBE_GIT_VERSION
=
$(
echo
"
${
KUBE_GIT_VERSION
}
"
|
sed
"s/-g
\(
[0-9a-f]
\{
14
\}\)
$/
+
\1
/"
)
fi
if
[[
"
${
KUBE_GIT_TREE_STATE
}
"
==
"dirty"
]]
;
then
if
[[
"
${
KUBE_GIT_TREE_STATE
}
"
==
"dirty"
]]
;
then
# git describe --dirty only considers changes to existing files, but
# git describe --dirty only considers changes to existing files, but
# that is problematic since new untracked .go files affect the build,
# that is problematic since new untracked .go files affect the build,
...
...
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