diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2020-02-18 20:30:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-18 20:30:40 -0500 |
| commit | 8e590d069b25814d28790c9f3c1dcb849acbac97 (patch) | |
| tree | ce16953d18051dab3199e30b77b14784647290a5 /bin/build-distribution-archives | |
| parent | 4937721b7db4070c8d4a6027ff7c016fce8c1ee0 (diff) | |
| parent | 3c32246568af85871717a0f3e7d132f9f1a0ea3e (diff) | |
Merge pull request #573 from inkstitch/lneva/stdout-encoding
fixes
Diffstat (limited to 'bin/build-distribution-archives')
| -rwxr-xr-x | bin/build-distribution-archives | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index bbc61996..825db510 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,16 +1,8 @@ -# TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)" -OS="${TRAVIS_OS_NAME}" -ARCH="$(uname -m)" +#!/bin/bash -MACVERSION="${TRAVIS_OSX_IMAGE}" -if [ ${MACVERSION} = "xcode9.2" ]; then - MACVERSION="sierra" -elif [ ${MACVERSION} = "xcode9.4" ]; then - MACVERSION="high_sierra" -elif [ ${MACVERSION} = "xcode10.2" ]; then - MACVERSION="mojave" -fi +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 @@ -21,18 +13,20 @@ else cp -a electron/dist/*-unpacked dist/inkstitch/electron fi +mkdir artifacts + for d in inx/*; do lang=${d%.*} - lang=${lang#*/} + lang=${lang#*/} cp $d/*.inx dist cd dist - if [ "$BUILD" = "windows" ]; then - zip -r ../inkstitch-${VERSION}-win32-${lang}.zip * - elif [ "$BUILD" = "osx" ]; then - tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * - else - tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * - fi - cd .. + 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 |
