mirror of https://github.com/knative/client.git
Add the support to build container image for kn (#152)
This commit is contained in:
parent
0800d7c4d3
commit
5d2a7aa912
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Copyright 2019 The Knative Authors
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
# https://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.
|
||||||
|
|
||||||
|
image: github.com/knative/client/cmd/kn
|
||||||
|
|
@ -32,7 +32,9 @@ function build_release() {
|
||||||
GOOS=darwin GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/...
|
GOOS=darwin GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/...
|
||||||
echo "🚧 🎠 Building for Windows"
|
echo "🚧 🎠 Building for Windows"
|
||||||
GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/...
|
GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/...
|
||||||
ARTIFACTS_TO_PUBLISH="kn-darwin-amd64 kn-linux-amd64 kn-windows-amd64.exe"
|
echo "🚧 🐳 Building the container image"
|
||||||
|
ko resolve ${KO_FLAGS} -f config/ > kn-image-location.yaml
|
||||||
|
ARTIFACTS_TO_PUBLISH="kn-darwin-amd64 kn-linux-amd64 kn-windows-amd64.exe kn-image-location.yaml"
|
||||||
if type sha256sum >/dev/null 2>&1; then
|
if type sha256sum >/dev/null 2>&1; then
|
||||||
echo "🧮 Checksum:"
|
echo "🧮 Checksum:"
|
||||||
sha256sum ${ARTIFACTS_TO_PUBLISH}
|
sha256sum ${ARTIFACTS_TO_PUBLISH}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue