building now
This commit is contained in:
11
.project
Normal file
11
.project
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>drone-runner-podman</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -13,7 +13,7 @@ set -x
|
|||||||
|
|
||||||
# linux - btw, I use amd64 arch linux... okay its manjaro... close enough
|
# linux - btw, I use amd64 arch linux... okay its manjaro... close enough
|
||||||
#GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-runner-podman
|
#GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-runner-podman
|
||||||
GOOS=linux GOARCH=arm64 go build -o release/linux/arm64/drone-runner-podman
|
GOOS=linux GOARCH=arm64 go build -tags containers_image_openpgp -o release/linux/arm64/drone-runner-podman
|
||||||
# GOOS=linux GOARCH=arm go build -o release/linux/arm/drone-runner-podman
|
# GOOS=linux GOARCH=arm go build -o release/linux/arm/drone-runner-podman
|
||||||
# GOOS=linux GOARCH=ppc64le go build -o release/linux/ppc64le/drone-runner-podman
|
# GOOS=linux GOARCH=ppc64le go build -o release/linux/ppc64le/drone-runner-podman
|
||||||
|
|
||||||
|
|||||||
30
scripts/download-deps.sh
Executable file
30
scripts/download-deps.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION=${1#"v"}
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
echo "Please specify the Kubernetes version: e.g."
|
||||||
|
echo "./download-deps.sh v1.21.0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Find out all the replaced imports, make a list of them.
|
||||||
|
MODS=($(
|
||||||
|
curl -sS "https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod" |
|
||||||
|
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
|
||||||
|
))
|
||||||
|
|
||||||
|
# Now add those similar replace statements in the local go.mod file, but first find the version that
|
||||||
|
# the Kubernetes is using for them.
|
||||||
|
for MOD in "${MODS[@]}"; do
|
||||||
|
V=$(
|
||||||
|
go mod download -json "${MOD}@kubernetes-${VERSION}" |
|
||||||
|
sed -n 's|.*"Version": "\(.*\)".*|\1|p'
|
||||||
|
)
|
||||||
|
|
||||||
|
go mod edit "-replace=${MOD}=${MOD}@${V}"
|
||||||
|
done
|
||||||
|
|
||||||
|
go get "k8s.io/kubernetes@v${VERSION}"
|
||||||
|
go mod download
|
||||||
Reference in New Issue
Block a user