Browse Source

Merge pull request #386 from tendermint/bugfix/385-dist-build-error

permissions error during make dist
pull/393/head
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
23eb8691a8
2 changed files with 8 additions and 9 deletions
  1. +4
    -2
      scripts/dist.sh
  2. +4
    -7
      scripts/dist_build.sh

+ 4
- 2
scripts/dist.sh View File

@ -31,9 +31,11 @@ docker build -t tendermint/tendermint-builder scripts/tendermint-builder/
docker run --rm -e "BUILD_TAGS=$BUILD_TAGS" -v "$(pwd)":/go/src/github.com/tendermint/tendermint tendermint/tendermint-builder ./scripts/dist_build.sh
# Add "tendermint" and $VERSION prefix to package name.
for FILENAME in $(find ./build/dist -mindepth 1 -maxdepth 1 -type f); do
rm -rf ./build/dist
mkdir -p ./build/dist
for FILENAME in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type f); do
FILENAME=$(basename "$FILENAME")
mv "./build/dist/${FILENAME}" "./build/dist/tendermint_${VERSION}_${FILENAME}"
cp "./build/pkg/${FILENAME}" "./build/dist/tendermint_${VERSION}_${FILENAME}"
done
# Make the checksums.


+ 4
- 7
scripts/dist_build.sh View File

@ -20,8 +20,8 @@ XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"}
# Delete the old dir
echo "==> Removing old directory..."
rm -rf build/dist/*
mkdir -p build/dist
rm -rf build/pkg
mkdir -p build/pkg
# Make sure build tools are available.
make tools
@ -36,13 +36,13 @@ echo "==> Building..."
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "build/dist/{{.OS}}_{{.Arch}}/tendermint" \
-output "build/pkg/{{.OS}}_{{.Arch}}/tendermint" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/tendermint/cmd/tendermint
# Zip all the files.
echo "==> Packaging..."
for PLATFORM in $(find ./build/dist -mindepth 1 -maxdepth 1 -type d); do
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
OSARCH=$(basename "${PLATFORM}")
echo "--> ${OSARCH}"
@ -51,7 +51,4 @@ for PLATFORM in $(find ./build/dist -mindepth 1 -maxdepth 1 -type d); do
popd >/dev/null 2>&1
done
# Remove build/dist/{{.OS}}_{{.Arch}} directories.
rm -rf build/dist/*/
exit 0

Loading…
Cancel
Save