musique/scripts/release

46 lines
1.3 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2022-09-25 23:08:24 +02:00
# This script creates a release of Musique programming language
# Release is defined as a zip archive containing source code,
# build binaries for supported platforms and build documentation
set -e -o pipefail
Suffix="$(date +"%Y-%m-%d")"
Target="release_$Suffix"
if [ -d "$Target" ]; then
rm -rf "$Target"
fi
mkdir -p "$Target"
2022-10-08 20:32:41 +02:00
make clean && make bin/musique
cp bin/musique "$Target"/
2022-10-08 20:32:41 +02:00
make clean && make bin/musique os=windows
cp bin/musique.exe "$Target"/
echo "Copy examples, license and documentation"
cp LICENSE "$Target"/LICENSE
2022-09-25 23:08:24 +02:00
cp CHANGELOG.md "$Target/CHANGELOG.md"
cp -r examples "$Target"/examples
2022-09-18 21:40:44 +02:00
sed "s/bin\/musique/musique/" scripts/install > "$Target"/install.sh
2022-09-18 21:25:42 +02:00
chmod 0755 "$Target"/install.sh
lowdown -s doc/overview.md -m "title:Omówienie języka Musique" -o "$Target"/overview.html
lowdown -s doc/functions.md -m "title:Lista funkcji języka Musique" -o "$Target"/functions.html
2022-09-25 23:08:24 +02:00
python scripts/language-cmp-cheatsheet.py doc/musique-vs-languages-cheatsheet.template
mv doc/musique-vs-languages-cheatsheet.html "${Target}/musique-vs-others-cheatsheet.html"
echo "Copy source code"
git clone --recursive --quiet --depth=1 "$(git remote -v | awk '{ print $2 }' | head -n1)" "$Target"/source_code
rm -rf "$Target"/source_code/.git
echo "Boundle it all up"
zip -q -r "musique_$Suffix.zip" "$Target"/*