Build cleanup

pull/1055/head
Erik Wilson 5 years ago
parent dd89c5119c
commit 671d702dc1

@ -1,18 +1,18 @@
#!/bin/bash #!/bin/bash
set -e -x set -e -x
source $(dirname $0)/version.sh
cd $(dirname $0)/.. cd $(dirname $0)/..
. ./scripts/version.sh
PKG="github.com/rancher/k3s" PKG="github.com/rancher/k3s"
PKG_CONTAINERD="github.com/containerd/containerd" PKG_CONTAINERD="github.com/containerd/containerd"
PKG_RANCHER_CONTAINERD="github.com/rancher/containerd" PKG_RANCHER_CONTAINERD="github.com/rancher/containerd"
PKG_CRICTL="github.com/kubernetes-sigs/cri-tools" PKG_CRICTL="github.com/kubernetes-sigs/cri-tools"
VENDOR_PREFIX=
if [ -z "$(go mod why 2>/dev/null)" ]; then
VENDOR_PREFIX="${PKG}/vendor/"
fi
export GO111MODULE=off
VENDOR_PREFIX="${PKG}/vendor/"
VERSIONFLAGS=" VERSIONFLAGS="
-X ${PKG}/pkg/version.Version=${VERSION} -X ${PKG}/pkg/version.Version=${VERSION}
-X ${PKG}/pkg/version.GitCommit=${COMMIT:0:8} -X ${PKG}/pkg/version.GitCommit=${COMMIT:0:8}

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
source $(dirname $0)/version.sh
cd $(dirname $0)/.. cd $(dirname $0)/..
. ./scripts/version.sh
ROOT_VERSION=v0.3.0 ROOT_VERSION=v0.3.0
TRAEFIK_VERSION=1.77.1 TRAEFIK_VERSION=1.77.1
CHARTS_DIR=build/static/charts CHARTS_DIR=build/static/charts

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e -x set -e -x
source $(dirname $0)/version.sh
cd $(dirname $0)/.. cd $(dirname $0)/..
. ./scripts/version.sh
images=$(cat scripts/airgap/image-list.txt) images=$(cat scripts/airgap/image-list.txt)
xargs -n1 docker pull <<< "${images}" xargs -n1 docker pull <<< "${images}"
docker save ${images} -o dist/artifacts/k3s-airgap-images-${ARCH}.tar docker save ${images} -o dist/artifacts/k3s-airgap-images-${ARCH}.tar

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e -x set -e -x
source $(dirname $0)/version.sh
cd $(dirname $0)/.. cd $(dirname $0)/..
. ./scripts/version.sh
rm -rf bin/crictl bin/kubectl bin/k3s-agent bin/k3s-server bin/kubectl bin/k3s build/data rm -rf bin/crictl bin/kubectl bin/k3s-agent bin/k3s-server bin/kubectl bin/k3s build/data
ln -s containerd bin/k3s-agent ln -s containerd bin/k3s-agent
ln -s containerd bin/k3s-server ln -s containerd bin/k3s-server

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
source $(dirname $0)/version.sh
cd $(dirname $0)/.. cd $(dirname $0)/..
. ./scripts/version.sh
TAG=${TAG:-${VERSION}${SUFFIX}} TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-rancher} REPO=${REPO:-rancher}
IMAGE_NAME=${IMAGE_NAME:-k3s} IMAGE_NAME=${IMAGE_NAME:-k3s}

@ -4,7 +4,7 @@ set -e -x
cd $(dirname $0)/.. cd $(dirname $0)/..
if [ -z "$K3S_IMAGE" ]; then if [ -z "$K3S_IMAGE" ]; then
source $(dirname $0)/version.sh . ./scripts/version.sh
TAG=${TAG:-${VERSION}${SUFFIX}} TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-rancher} REPO=${REPO:-rancher}
IMAGE_NAME=${IMAGE_NAME:-k3s} IMAGE_NAME=${IMAGE_NAME:-k3s}

@ -16,8 +16,8 @@ fi
ARCH=$(go env GOARCH) ARCH=$(go env GOARCH)
SUFFIX="-${ARCH}" SUFFIX="-${ARCH}"
VERSION_CONTAINERD=$(grep github.com/containerd/containerd $(dirname $0)/../go.mod | head -n1 | awk '{print $4}') VERSION_CONTAINERD=$(grep github.com/containerd/containerd go.mod | head -n1 | awk '{print $4}')
VERSION_CRICTL=$(grep github.com/kubernetes-sigs/cri-tools $(dirname $0)/../go.mod | head -n1 | awk '{print $4}') VERSION_CRICTL=$(grep github.com/kubernetes-sigs/cri-tools go.mod | head -n1 | awk '{print $4}')
if [ -z "$VERSION_CONTAINERD" ]; then if [ -z "$VERSION_CONTAINERD" ]; then
VERSION_CONTAINERD="v0.0.0" VERSION_CONTAINERD="v0.0.0"

Loading…
Cancel
Save