Release build system partially moved to Docker
Change to Docker forced by need of supporting older Ubuntu releases with older glibc without building them on host
This commit is contained in:
parent
609ddf1854
commit
7aecf2ea19
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
ARG TZ=Europe/Warsaw
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
RUN apt update && apt upgrade -y && apt install -y build-essential software-properties-common zip unzip
|
||||||
|
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
RUN apt install -y gcc-11 g++-11 libasound2-dev
|
@ -8,7 +8,7 @@ set -e -o pipefail
|
|||||||
|
|
||||||
Suffix="$(date +"%Y-%m-%d")"
|
Suffix="$(date +"%Y-%m-%d")"
|
||||||
Target="release_$Suffix"
|
Target="release_$Suffix"
|
||||||
|
Image="musique-builder"
|
||||||
|
|
||||||
if [ -d "$Target" ]; then
|
if [ -d "$Target" ]; then
|
||||||
rm -rf "$Target"
|
rm -rf "$Target"
|
||||||
@ -16,14 +16,18 @@ fi
|
|||||||
|
|
||||||
mkdir -p "$Target"
|
mkdir -p "$Target"
|
||||||
|
|
||||||
make clean && make os=linux
|
if [[ "$(docker images -q "$Image")" == "" ]]; then
|
||||||
|
docker build -t "$Image" .
|
||||||
|
fi
|
||||||
|
sudo rm -rf bin/
|
||||||
|
docker run -it --rm -v "$(pwd):/musique" -w /musique "$Image" make os=linux CC=gcc-11 CXX=g++-11 >/dev/null
|
||||||
|
|
||||||
cp bin/musique "$Target"/
|
cp bin/musique "$Target"/
|
||||||
|
|
||||||
make clean && make os=windows
|
sudo rm -rf bin/
|
||||||
|
make os=windows >/dev/null
|
||||||
cp bin/musique.exe "$Target"/
|
cp bin/musique.exe "$Target"/
|
||||||
|
|
||||||
echo "Copy examples, license and documentation"
|
|
||||||
|
|
||||||
cp LICENSE "$Target"/LICENSE
|
cp LICENSE "$Target"/LICENSE
|
||||||
cp CHANGELOG.md "$Target/CHANGELOG.md"
|
cp CHANGELOG.md "$Target/CHANGELOG.md"
|
||||||
cp -r examples "$Target"/examples
|
cp -r examples "$Target"/examples
|
||||||
@ -34,11 +38,7 @@ lowdown -s doc/functions.md -m "title:Lista funkcji języka Musique" -o "$Target
|
|||||||
python scripts/language-cmp-cheatsheet.py doc/musique-vs-languages-cheatsheet.template
|
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"
|
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
|
git clone --recursive --quiet --depth=1 "$(git remote -v | awk '{ print $2 }' | head -n1)" "$Target"/source_code
|
||||||
rm -rf "$Target"/source_code/.git
|
rm -rf "$Target"/source_code/.git
|
||||||
|
|
||||||
echo "Boundle it all up"
|
|
||||||
|
|
||||||
zip -q -r "musique_$Suffix.zip" "$Target"/*
|
zip -q -r "musique_$Suffix.zip" "$Target"/*
|
||||||
|
Loading…
Reference in New Issue
Block a user