1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/usr/bin/env bash
set -u -e -o pipefail
mkdir -p dist
for build in $(ls .build); do
echo "Creating archive for ${build}"
cp LICENSE README.md ".build/${build}/"
if [[ "${build}" =~ windows-.*$ ]] ; then
# Make sure to clear out zip files to prevent zip from appending to the archive.
rm "dist/${build}.zip" || true
cd ".build/" && zip -r --quiet -9 "../dist/${build}.zip" "${build}" && cd ../
else
tar -C ".build/" -czf "dist/${build}.tar.gz" "${build}"
fi
done
cd dist
sha256sum *.gz *.zip > sha256sums.txt
ls -la
cd ..
|