Skip to content

Commit

Permalink
fix: compares files with make output
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Xiao <[email protected]>
  • Loading branch information
muma378 committed Sep 1, 2023
1 parent a43b132 commit f980821
Show file tree
Hide file tree
Showing 47 changed files with 322 additions and 471 deletions.
512 changes: 41 additions & 471 deletions test/release/build.test.sh

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions test/release/cases.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
build,build
build-with-push-bucket,"PUSH=true BUCKET=bucket build"
build-with-push-bucket-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} build"
build-with-push-ghrelease,"PUSH=true GH_RELEASE=ghrelease build"
image,image
image-with-push,"PUSH=true image"
image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image"
image-nerdctl,"BUILDER=nerdctl image"
image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true image"
image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image"
image-podman,"BUILDER=podman image"
image-podman-with-push,"BUILDER=podman PUSH=true image"
image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image"
cluster-image,"cluster-image"
cluster-image-with-push,"PUSH=true cluster-image"
cluster-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cluster-image"
cluster-image-nerdctl,"BUILDER=nerdctl cluster-image"
cluster-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cluster-image"
cluster-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cluster-image"
cross-build,"cross-build"
cross-build-with-push,"PUSH=true cross-build"
cross-build-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-build"
cross-build-with-push-bucket-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-build"
cross-build-with-push-ghrelease,"PUSH=true GH_RELEASE=ghrelease cross-build"
cross-image,cross-image
cross-image-with-push,"PUSH=true cross-image"
cross-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-image"
cross-image-nerdctl,"BUILDER=nerdctl cross-image"
cross-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cross-image"
cross-image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-image"
cross-image-podman,"BUILDER=podman cross-image"
cross-image-podman-with-push,"BUILDER=podman PUSH=true cross-image"
cross-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-image"
cross-cluster-image,"cross-cluster-image"
cross-cluster-image-with-push,"PUSH=true cross-cluster-image"
cross-cluster-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image"
cross-cluster-image-nerdctl,"BUILDER=nerdctl cross-cluster-image"
cross-cluster-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cross-cluster-image"
cross-cluster-image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image"
cross-cluster-image-podman,"BUILDER=podman cross-cluster-image"
cross-cluster-image-podman-with-push,"BUILDER=podman PUSH=true cross-cluster-image"
cross-cluster-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image"
manifests,"MANIFESTS=kwok IMAGE_PREFIX=${IMAGE_PREFIX} manifests"
manifests-with-push-ghrelease,"PUSH=true MANIFESTS=kwok GH_RELEASE=ghrelease IMAGE_PREFIX=${IMAGE_PREFIX} manifests"
manifests-with-push-bucket,"PUSH=true MANIFESTS=kwok BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} IMAGE_PREFIX=${IMAGE_PREFIX} manifests"
4 changes: 4 additions & 0 deletions test/release/testdata/build-with-push-bucket-staging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/<ARCH>/kwok bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwok
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/<ARCH>/kwokctl bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwokctl
4 changes: 4 additions & 0 deletions test/release/testdata/build-with-push-bucket.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/<ARCH>/kwok bucket/releases/<VERSION>/bin/<OS>/<ARCH>/kwok
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/<ARCH>/kwokctl bucket/releases/<VERSION>/bin/<OS>/<ARCH>/kwokctl
6 changes: 6 additions & 0 deletions test/release/testdata/build-with-push-ghrelease.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
cp ./bin/<OS>/<ARCH>/kwok kwok-<OS>-<ARCH>
gh -R ghrelease release upload <VERSION> kwok-<OS>-<ARCH>
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
cp ./bin/<OS>/<ARCH>/kwokctl kwokctl-<OS>-<ARCH>
gh -R ghrelease release upload <VERSION> kwokctl-<OS>-<ARCH>
2 changes: 2 additions & 0 deletions test/release/testdata/build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
6 changes: 6 additions & 0 deletions test/release/testdata/cluster-image-nerdctl-with-push.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
nerdctl push --platform=<OS>/<ARCH> cluster:<VERSION>-k8s.v1.28.0
nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
nerdctl push --platform=<OS>/<ARCH> cluster:<VERSION>-k8s.v1.27.3
nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
nerdctl push --platform=<OS>/<ARCH> cluster:<VERSION>-k8s.v1.26.6
3 changes: 3 additions & 0 deletions test/release/testdata/cluster-image-nerdctl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
podman build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
podman push --platform=<OS>/<ARCH> image-prefix/cluster:prefix-<VERSION>-k8s.v1.28.0
podman build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
podman push --platform=<OS>/<ARCH> image-prefix/cluster:prefix-<VERSION>-k8s.v1.27.3
podman build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> -f ./images/cluster/Dockerfile .
podman push --platform=<OS>/<ARCH> image-prefix/cluster:prefix-<VERSION>-k8s.v1.26.6
3 changes: 3 additions & 0 deletions test/release/testdata/cluster-image-with-push-staging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker buildx build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix-<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
3 changes: 3 additions & 0 deletions test/release/testdata/cluster-image-with-push.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> --push -f ./images/cluster/Dockerfile .
3 changes: 3 additions & 0 deletions test/release/testdata/cluster-image.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:<VERSION>-k8s.v1.28.0 --platform=<OS>/<ARCH> --load -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:<VERSION>-k8s.v1.27.3 --platform=<OS>/<ARCH> --load -f ./images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:<VERSION>-k8s.v1.26.6 --platform=<OS>/<ARCH> --load -f ./images/cluster/Dockerfile .
24 changes: 24 additions & 0 deletions test/release/testdata/cross-build-with-push-bucket-staging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/<ARCH>/kwok bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwok
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/<ARCH>/kwokctl bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwokctl
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/arm64/kwok bucket/releases/prefix-<VERSION>/bin/<OS>/arm64/kwok
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/arm64/kwokctl bucket/releases/prefix-<VERSION>/bin/<OS>/arm64/kwokctl
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/darwin/<ARCH>/kwok bucket/releases/prefix-<VERSION>/bin/darwin/<ARCH>/kwok
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/darwin/<ARCH>/kwokctl bucket/releases/prefix-<VERSION>/bin/darwin/<ARCH>/kwokctl
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok
gsutil cp -P ./bin/darwin/arm64/kwok bucket/releases/prefix-<VERSION>/bin/darwin/arm64/kwok
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/darwin/arm64/kwokctl bucket/releases/prefix-<VERSION>/bin/darwin/arm64/kwokctl
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwok.exe ./cmd/kwok
gsutil cp -P ./bin/windows/<ARCH>/kwok.exe bucket/releases/prefix-<VERSION>/bin/windows/<ARCH>/kwok.exe
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwokctl.exe ./cmd/kwokctl
gsutil cp -P ./bin/windows/<ARCH>/kwokctl.exe bucket/releases/prefix-<VERSION>/bin/windows/<ARCH>/kwokctl.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok
gsutil cp -P ./bin/windows/arm64/kwok.exe bucket/releases/prefix-<VERSION>/bin/windows/arm64/kwok.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl
gsutil cp -P ./bin/windows/arm64/kwokctl.exe bucket/releases/prefix-<VERSION>/bin/windows/arm64/kwokctl.exe
36 changes: 36 additions & 0 deletions test/release/testdata/cross-build-with-push-ghrelease.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
cp ./bin/<OS>/<ARCH>/kwok kwok-<OS>-<ARCH>
gh -R ghrelease release upload <VERSION> kwok-<OS>-<ARCH>
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
cp ./bin/<OS>/<ARCH>/kwokctl kwokctl-<OS>-<ARCH>
gh -R ghrelease release upload <VERSION> kwokctl-<OS>-<ARCH>
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwok ./cmd/kwok
cp ./bin/<OS>/arm64/kwok kwok-<OS>-arm64
gh -R ghrelease release upload <VERSION> kwok-<OS>-arm64
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwokctl ./cmd/kwokctl
cp ./bin/<OS>/arm64/kwokctl kwokctl-<OS>-arm64
gh -R ghrelease release upload <VERSION> kwokctl-<OS>-arm64
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwok ./cmd/kwok
cp ./bin/darwin/<ARCH>/kwok kwok-darwin-<ARCH>
gh -R ghrelease release upload <VERSION> kwok-darwin-<ARCH>
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwokctl ./cmd/kwokctl
cp ./bin/darwin/<ARCH>/kwokctl kwokctl-darwin-<ARCH>
gh -R ghrelease release upload <VERSION> kwokctl-darwin-<ARCH>
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok
cp ./bin/darwin/arm64/kwok kwok-darwin-arm64
gh -R ghrelease release upload <VERSION> kwok-darwin-arm64
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl
cp ./bin/darwin/arm64/kwokctl kwokctl-darwin-arm64
gh -R ghrelease release upload <VERSION> kwokctl-darwin-arm64
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwok.exe ./cmd/kwok
cp ./bin/windows/<ARCH>/kwok.exe kwok-windows-<ARCH>.exe
gh -R ghrelease release upload <VERSION> kwok-windows-<ARCH>.exe
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwokctl.exe ./cmd/kwokctl
cp ./bin/windows/<ARCH>/kwokctl.exe kwokctl-windows-<ARCH>.exe
gh -R ghrelease release upload <VERSION> kwokctl-windows-<ARCH>.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok
cp ./bin/windows/arm64/kwok.exe kwok-windows-arm64.exe
gh -R ghrelease release upload <VERSION> kwok-windows-arm64.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl
cp ./bin/windows/arm64/kwokctl.exe kwokctl-windows-arm64.exe
gh -R ghrelease release upload <VERSION> kwokctl-windows-arm64.exe
24 changes: 24 additions & 0 deletions test/release/testdata/cross-build-with-push-staging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/<ARCH>/kwok bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwok
GOOS=<OS> GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/<ARCH>/kwokctl bucket/releases/prefix-<VERSION>/bin/<OS>/<ARCH>/kwokctl
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwok ./cmd/kwok
gsutil cp -P ./bin/<OS>/arm64/kwok bucket/releases/prefix-<VERSION>/bin/<OS>/arm64/kwok
GOOS=<OS> GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/<OS>/arm64/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/<OS>/arm64/kwokctl bucket/releases/prefix-<VERSION>/bin/<OS>/arm64/kwokctl
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwok ./cmd/kwok
gsutil cp -P ./bin/darwin/<ARCH>/kwok bucket/releases/prefix-<VERSION>/bin/darwin/<ARCH>/kwok
GOOS=darwin GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/<ARCH>/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/darwin/<ARCH>/kwokctl bucket/releases/prefix-<VERSION>/bin/darwin/<ARCH>/kwokctl
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok
gsutil cp -P ./bin/darwin/arm64/kwok bucket/releases/prefix-<VERSION>/bin/darwin/arm64/kwok
GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl
gsutil cp -P ./bin/darwin/arm64/kwokctl bucket/releases/prefix-<VERSION>/bin/darwin/arm64/kwokctl
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwok.exe ./cmd/kwok
gsutil cp -P ./bin/windows/<ARCH>/kwok.exe bucket/releases/prefix-<VERSION>/bin/windows/<ARCH>/kwok.exe
GOOS=windows GOARCH=<ARCH> go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/<ARCH>/kwokctl.exe ./cmd/kwokctl
gsutil cp -P ./bin/windows/<ARCH>/kwokctl.exe bucket/releases/prefix-<VERSION>/bin/windows/<ARCH>/kwokctl.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok
gsutil cp -P ./bin/windows/arm64/kwok.exe bucket/releases/prefix-<VERSION>/bin/windows/arm64/kwok.exe
GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=<VERSION> -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl
gsutil cp -P ./bin/windows/arm64/kwokctl.exe bucket/releases/prefix-<VERSION>/bin/windows/arm64/kwokctl.exe
Loading

0 comments on commit f980821

Please sign in to comment.