inkstitch/bin/build-distribution-archives

33 wiersze
819 B
Bash
Executable File

#!/bin/bash
VERSION="$(echo ${GITHUB_REF} | tr / -)"
OS="${BUILD:-$(uname)}"
ARCH="$(uname -m)"
cp -a images/examples palettes symbols fonts dist/inkstitch
cp -a icons locales print dist/inkstitch/bin
if [ "$BUILD" = "osx" ]; then
cp -a electron/dist/mac dist/inkstitch/electron
else
cp -a electron/dist/*-unpacked dist/inkstitch/electron
fi
mkdir artifacts
for d in inx/*; do
lang=${d%.*}
lang=${lang#*/}
cp $d/*.inx dist
cd dist
if [ "$BUILD" = "windows" ]; then
# The python zipfile command line utility can't handle directories
# containing files with UTF-8 names on Windows, so we use 7-zip instead.
7z a ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip *
else
python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip *
fi
cd ..
done