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
518115c9
Commit
518115c9
authored
Nov 24, 2014
by
Joe Beda
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2574 from jbeda/build-fixes
Build fixes
parents
936f2c96
35313c60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
4 deletions
+82
-4
common.sh
build/common.sh
+2
-2
mark-new-version.sh
build/mark-new-version.sh
+77
-0
push-official-release.sh
build/push-official-release.sh
+3
-2
No files found.
build/common.sh
View file @
518115c9
...
@@ -187,7 +187,7 @@ function kube::build::prepare_output() {
...
@@ -187,7 +187,7 @@ function kube::build::prepare_output() {
# volume mounts. We can work around this by explicitly adding a security
# volume mounts. We can work around this by explicitly adding a security
# context to the _output directory.
# context to the _output directory.
# Details: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_and_Linux_Containers_Guide/sec-Sharing_Data_Across_Containers.html#sec-Mounting_a_Host_Directory_to_a_Container
# Details: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_and_Linux_Containers_Guide/sec-Sharing_Data_Across_Containers.html#sec-Mounting_a_Host_Directory_to_a_Container
if
which selinuxenabled
>
/dev/null
&&
\
if
which selinuxenabled
&
>/dev/null
&&
\
selinuxenabled
&&
\
selinuxenabled
&&
\
which
chcon
>
/dev/null
;
then
which
chcon
>
/dev/null
;
then
if
[[
!
$(
ls
-Zd
"
${
LOCAL_OUTPUT_ROOT
}
"
)
=
~ svirt_sandbox_file_t
]]
;
then
if
[[
!
$(
ls
-Zd
"
${
LOCAL_OUTPUT_ROOT
}
"
)
=
~ svirt_sandbox_file_t
]]
;
then
...
@@ -592,7 +592,7 @@ function kube::release::create_tarball() {
...
@@ -592,7 +592,7 @@ function kube::release::create_tarball() {
# Find gnu tar if it is available
# Find gnu tar if it is available
local tar
=
tar
local tar
=
tar
if
which gtar
>
/dev/null
;
then
if
which gtar
&>
/dev/null
;
then
tar
=
gtar
tar
=
gtar
fi
fi
...
...
build/mark-new-version.sh
0 → 100755
View file @
518115c9
#!/bin/bash
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Bumps the version number by creating a couple of commits.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
NEW_VERSION
=
${
1
-
}
VERSION_REGEX
=
"v([0-9]+).([0-9]+(.[0-9]+)?)"
[[
${
NEW_VERSION
}
=
~
$VERSION_REGEX
]]
||
{
echo
"!!! You must specify the version in the form of '
$VERSION_REGEX
'"
>
&2
exit
1
}
VERSION_MAJOR
=
"
${
BASH_REMATCH
[1]
}
"
VERSION_MINOR
=
"
${
BASH_REMATCH
[2]
}
"
if
!
git diff-index
--quiet
--cached
HEAD
;
then
echo
"!!! You must not have any changes in your index when running this command"
exit
1
fi
if
!
git diff-files
--quiet
pkg/version/base.go
;
then
echo
"!!! You have changes in 'pkg/version/base.go' already."
exit
1
fi
SED
=
sed
if
which gsed &>/dev/null
;
then
SED
=
gsed
fi
if
!
(
"
$SED
"
--version
2>&1 |
grep
-q
GNU
)
;
then
echo
"!!! GNU sed is required. If on OS X, use 'brew install gnu-sed'."
fi
VERSION_FILE
=
"
${
KUBE_ROOT
}
/pkg/version/base.go"
echo
"+++ Updating to
${
NEW_VERSION
}
"
"
$SED
"
-r
-i
-e
"s/gitMajor
\s
+string =
\"
[^
\"
]*
\"
/gitMajor string =
\"
$VERSION_MAJOR
\"
/"
"
${
VERSION_FILE
}
"
"
$SED
"
-r
-i
-e
"s/gitMinor
\s
+string =
\"
[^
\"
]*
\"
/gitMinor string =
\"
$VERSION_MINOR
\"
/"
"
${
VERSION_FILE
}
"
"
$SED
"
-r
-i
-e
"s/gitVersion
\s
+string =
\"
[^
\"
]*
\"
/gitVersion string =
\"
$NEW_VERSION
\"
/"
"
${
VERSION_FILE
}
"
gofmt
-s
-w
"
${
VERSION_FILE
}
"
echo
"+++ Committing version change"
git add
"
${
VERSION_FILE
}
"
git commit
-m
"Kubernetes version
$NEW_VERSION
"
echo
"+++ Tagging version"
git tag
-a
-m
"Kubernetes version
$NEW_VERSION
"
"
${
NEW_VERSION
}
"
echo
"+++ Updating to
${
NEW_VERSION
}
-dev"
"
$SED
"
-r
-i
-e
"s/gitMajor
\s
+string =
\"
[^
\"
]*
\"
/gitMajor string =
\"
$VERSION_MAJOR
\"
/"
"
${
VERSION_FILE
}
"
"
$SED
"
-r
-i
-e
"s/gitMinor
\s
+string =
\"
[^
\"
]*
\"
/gitMinor string =
\"
$VERSION_MINOR
\+\"
/"
"
${
VERSION_FILE
}
"
"
$SED
"
-r
-i
-e
"s/gitVersion
\s
+string =
\"
[^
\"
]*
\"
/gitVersion string =
\"
$NEW_VERSION
-dev
\"
/"
"
${
VERSION_FILE
}
"
gofmt
-s
-w
"
${
VERSION_FILE
}
"
echo
"+++ Committing version change"
git add
"
${
VERSION_FILE
}
"
git commit
-m
"Kubernetes version
${
NEW_VERSION
}
-dev"
build/push-official-release.sh
View file @
518115c9
...
@@ -22,8 +22,9 @@ set -o pipefail
...
@@ -22,8 +22,9 @@ set -o pipefail
KUBE_RELEASE_VERSION
=
${
1
-
}
KUBE_RELEASE_VERSION
=
${
1
-
}
[[
-n
${
KUBE_RELEASE_VERSION
}
]]
||
{
VERSION_REGEX
=
"v[0-9]+.[0-9]+(.[0-9]+)?"
echo
"!!! You must specify the version you are releasing in the form of vX.Y.Z"
>
&2
[[
${
KUBE_RELEASE_VERSION
}
=
~
$VERSION_REGEX
]]
||
{
echo
"!!! You must specify the version you are releasing in the form of '
$VERSION_REGEX
'"
>
&2
exit
1
exit
1
}
}
...
...
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