This commit is contained in:
sam boyer 2018-07-11 01:27:49 -04:00
Родитель 4e6206280d c77d30917d
Коммит 221ce68962
3 изменённых файлов: 19 добавлений и 7 удалений

Просмотреть файл

@ -11,6 +11,7 @@ NEW FEATURES:
* Allow `DEPPROJECTROOT` [environment variable](https://golang.github.io/dep/docs/env-vars.html#depprojectroot) to supersede GOPATH deduction and explicitly set the current project's [root](https://golang.github.io/dep/docs/glossary.html#project-root) ([#1883](https://github.com/golang/dep/pull/1883)).
* `dep ensure` now explains what changes to the code or Gopkg.toml have induced solving ([#1912](https://github.com/golang/dep/pull/1912)).
* Hash digests of vendor contents are now stored in `Gopkg.lock`, and the contents of vendor are only rewritten on change or hash mismatch ([#1912](https://github.com/golang/dep/pull/1912)).
* Added support for ppc64/ppc64le.
BUG FIXES:

Просмотреть файл

@ -31,7 +31,7 @@ if [[ -z "${DEP_BUILD_PLATFORMS}" ]]; then
fi
if [[ -z "${DEP_BUILD_ARCHS}" ]]; then
DEP_BUILD_ARCHS="amd64 386"
DEP_BUILD_ARCHS="amd64 386 ppc64 ppc64le"
fi
mkdir -p "${DEP_ROOT}/release"
@ -50,10 +50,14 @@ for OS in ${DEP_BUILD_PLATFORMS[@]}; do
else
CGO_ENABLED=0
fi
echo "Building for ${OS}/${ARCH} with CGO_ENABLED=${CGO_ENABLED}"
GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=${CGO_ENABLED} ${GO_BUILD_CMD} -ldflags "${GO_BUILD_LDFLAGS}"\
-o "${DEP_ROOT}/release/${NAME}" ./cmd/dep/
shasum -a 256 "${DEP_ROOT}/release/${NAME}" > "${DEP_ROOT}/release/${NAME}".sha256
if [[ "${ARCH}" == "ppc64" || "${ARCH}" == "ppc64le" ]] && [[ "${OS}" != "linux" ]]; then
# ppc64 and ppc64le are only supported on Linux.
echo "Building for ${OS}/${ARCH} not supported."
else
echo "Building for ${OS}/${ARCH} with CGO_ENABLED=${CGO_ENABLED}"
GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=${CGO_ENABLED} ${GO_BUILD_CMD} -ldflags "${GO_BUILD_LDFLAGS}"\
-o "${DEP_ROOT}/release/${NAME}" ./cmd/dep/
shasum -a 256 "${DEP_ROOT}/release/${NAME}" > "${DEP_ROOT}/release/${NAME}".sha256
fi
done
done

Просмотреть файл

@ -95,6 +95,8 @@ initArch() {
amd64) ARCH="amd64";;
x86_64) ARCH="amd64";;
i386) ARCH="386";;
ppc64) ARCH="ppc64";;
ppc64le) ARCH="ppc64le";;
*) echo "Architecture ${ARCH} is not supported by this installation script"; exit 1;;
esac
echo "ARCH = $ARCH"
@ -133,7 +135,12 @@ fi
echo "Will install into $INSTALL_DIRECTORY"
# assemble expected release artifact name
BINARY="dep-${OS}-${ARCH}"
if [[ "${ARCH}" == "ppc64" || "${ARCH}" == "ppc64le" ]] && [[ "${OS}" != "linux" ]]; then
# ppc64 and ppc64le are only supported on Linux.
echo "${OS}-${ARCH} is not supported by this instalation script"
else
BINARY="dep-${OS}-${ARCH}"
fi
# add .exe if on windows
if [ "$OS" = "windows" ]; then