Merge pull request #5579 from qiuming-best/restic-cross-compile

[cherry-pick]Fix restic cross platform compile
This commit is contained in:
Jiaolin Yang
2022-11-09 21:29:47 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,8 +43,8 @@ ENV GOOS=${TARGETOS} \
GOARM=${TARGETVARIANT}
RUN mkdir -p /output/usr/bin && \
bash ./hack/build-restic.sh && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \
bash ./hack/build-restic.sh && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}
+1 -1
View File
@@ -50,6 +50,6 @@ fi
mkdir ${build_path}/restic
git clone -b v${RESTIC_VERSION} https://github.com/restic/restic.git ${build_path}/restic
pushd ${build_path}/restic
go run build.go -o ${restic_bin}
go run build.go --goos "${GOOS}" --goarch "${GOARCH}" --goarm "${GOARM}" -o ${restic_bin}
chmod +x ${restic_bin}
popd