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
db8bc689
Commit
db8bc689
authored
Apr 15, 2019
by
SataQiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shellcheck failures of hack/update-generated-kms-dockerized.sh…
fix shellcheck failures of hack/update-generated-kms-dockerized.sh hack/update-generated-protobuf-dockerized.sh
parent
0a59758c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
.shellcheck_failures
hack/.shellcheck_failures
+0
-2
update-generated-kms-dockerized.sh
hack/update-generated-kms-dockerized.sh
+8
-6
update-generated-protobuf-dockerized.sh
hack/update-generated-protobuf-dockerized.sh
+6
-4
No files found.
hack/.shellcheck_failures
View file @
db8bc689
...
...
@@ -42,8 +42,6 @@
./hack/make-rules/vet.sh
./hack/test-integration.sh
./hack/test-update-storage-objects.sh
./hack/update-generated-kms-dockerized.sh
./hack/update-generated-protobuf-dockerized.sh
./hack/update-generated-runtime-dockerized.sh
./hack/update-openapi-spec.sh
./hack/update-vendor.sh
...
...
hack/update-generated-kms-dockerized.sh
View file @
db8bc689
...
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
KUBE_KMS_GRPC_ROOT
=
"
${
KUBE_ROOT
}
/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1/"
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
...
...
@@ -40,22 +40,24 @@ if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then
fi
function
cleanup
{
rm
-f
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go.bak
rm
-f
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go.bak"
rm
-f
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go.tmp"
}
trap
cleanup EXIT
gogopath
=
$(
dirname
$(
kube::util::find-binary
"protoc-gen-gogo"
)
)
gogopath
=
$(
dirname
"
$(
kube::util::find-binary
"protoc-gen-gogo"
)
"
)
PATH
=
"
${
gogopath
}
:
${
PATH
}
"
\
protoc
\
--proto_path
=
"
${
KUBE_KMS_GRPC_ROOT
}
"
\
--proto_path
=
"
${
KUBE_ROOT
}
/vendor"
\
--gogo_out
=
plugins
=
grpc:
${
KUBE_KMS_GRPC_ROOT
}
${
KUBE_KMS_GRPC_ROOT
}
/service.proto
--gogo_out
=
plugins
=
grpc:
"
${
KUBE_KMS_GRPC_ROOT
}
"
"
${
KUBE_KMS_GRPC_ROOT
}
/service.proto"
# Update boilerplate for the generated file.
echo
"
$(
cat
hack/boilerplate/boilerplate.generatego.txt
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go
)
"
>
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go
cat
hack/boilerplate/boilerplate.generatego.txt
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go"
>
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go.tmp"
&&
\
mv
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go.tmp"
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go"
# Run gofmt to clean up the generated code.
kube::golang::verify_go_version
gofmt
-l
-s
-w
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go
gofmt
-l
-s
-w
"
${
KUBE_KMS_GRPC_ROOT
}
/service.pb.go"
hack/update-generated-protobuf-dockerized.sh
View file @
db8bc689
...
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
kube::golang::setup_env
...
...
@@ -41,7 +41,9 @@ fi
gotoprotobuf
=
$(
kube::util::find-binary
"go-to-protobuf"
)
APIROOTS
=(
${
1
}
)
while
IFS
=
$'
\n
'
read
-r
line
;
do
APIROOTS+
=(
"
$line
"
)
;
done
<<<
"
${
1
}
"
shift
# requires the 'proto' tag to build (will remove when ready)
...
...
@@ -52,6 +54,6 @@ PATH="${KUBE_ROOT}/_output/bin:${PATH}" \
"
${
gotoprotobuf
}
"
\
--proto-import
=
"
${
KUBE_ROOT
}
/vendor"
\
--proto-import
=
"
${
KUBE_ROOT
}
/third_party/protobuf"
\
--packages
=
$(
IFS
=
,
;
echo
"
${
APIROOTS
[*]
}
"
)
\
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.generatego.txt
\
--packages
=
"
$(
IFS
=
,
;
echo
"
${
APIROOTS
[*]
}
"
)
"
\
--go-header-file
"
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.generatego.txt"
\
"
$@
"
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