Skip to content

Commit

Permalink
scripts: fix issue with dist files havig bad format
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Apr 17, 2014
1 parent 6827a6d commit 5e129c3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion scripts/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,22 @@ rm -rf ./dist/pkg
mkdir -p ./dist/pkg
for FILENAME in $(find ./dist -mindepth 1 -maxdepth 1 -type f); do
FILENAME=$(basename $FILENAME)
EXTENSION="${FILENAME##*.}"
PLATFORM="${FILENAME%.*}"
zip ./dist/pkg/${VERSION}_${PLATFORM}.zip ./dist/${FILENAME}

if [ "${EXTENSION}" != "exe" ]; then
EXTENSION=""
else
EXTENSION=".${EXTENSION}"
fi

CONSULNAME="consul${EXTENSION}"

pushd ./dist
cp ${FILENAME} ${CONSULNAME}
zip ./pkg/${VERSION}_${PLATFORM}.zip ${CONSULNAME}
rm ${CONSULNAME}
popd
done

# Make the checksums
Expand Down

0 comments on commit 5e129c3

Please sign in to comment.