From 58df1501ae47e2c433553aa5f3f6bcee6b99da1c Mon Sep 17 00:00:00 2001 From: Holger Nahrstaedt <holger@nahrstaedt.de> Date: Tue, 8 May 2018 07:53:30 +0200 Subject: [PATCH] Enable build for linux in travis --- .travis.yml | 2 ++ util/package-linux.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 util/package-linux.sh diff --git a/.travis.yml b/.travis.yml index 1c4be61a..69da0c7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ matrix: python: 3.6 env: - TOXENV=py36short + - BUILD_LINUX=yes - os: osx osx_image: xcode9.3 language: objective-c @@ -65,6 +66,7 @@ script: after_success: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash util/package-osx.sh; fi + - if [[ "$BUILD_LINUX" == "yes" ]]; then bash util/package-linux.sh; fi - coveralls # - codecov # - python-codacy-coverage -r coverage.xml diff --git a/util/package-linux.sh b/util/package-linux.sh new file mode 100644 index 00000000..53a8897a --- /dev/null +++ b/util/package-linux.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +COMM_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) +COMM_COUNT=$(git rev-list --count HEAD) +BUILD="beempy-${COMM_TAG}-${COMM_COUNT}_linux.tar.gz" + + +rm -rf dist build locale +pip install +python setup.py clean +python setup.py build_ext +# python setup.py build_locales +pip install pyinstaller +pyinstaller beempy-onedir.spec + +cd dist + +tar -zcvf ${BUILD} beempy +if [ -n "$UPLOAD_LINUX" ] +then + curl --upload-file ${BUILD} https://transfer.sh/ + # Required for a newline between the outputs + echo -e "\n" + md5sum ${BUILD} + echo -e "\n" + sha256sum ${BUILD} +fi -- GitLab