Merge pull request #5577 from qiuming-best/release-1.9

Fix restic cross platform compile problem
pull/5615/head v1.9.3
lyndon 2022-11-09 20:11:49 +08:00 committed by GitHub
commit 9a617fe5af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ ENV GOOS=${TARGETOS} \
GOARM=${TARGETVARIANT} GOARM=${TARGETVARIANT}
RUN mkdir -p /output/usr/bin && \ RUN mkdir -p /output/usr/bin && \
bash ./hack/build-restic.sh && \
export GOARM=$( echo "${GOARM}" | cut -c2-) && \ export GOARM=$( echo "${GOARM}" | cut -c2-) && \
bash ./hack/build-restic.sh && \
go build -o /output/${BIN} \ go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN} -ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}

View File

@ -50,6 +50,6 @@ fi
mkdir ${build_path}/restic mkdir ${build_path}/restic
git clone -b v${RESTIC_VERSION} https://github.com/restic/restic.git ${build_path}/restic git clone -b v${RESTIC_VERSION} https://github.com/restic/restic.git ${build_path}/restic
pushd ${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} chmod +x ${restic_bin}
popd popd