Skip to content

Commit

Permalink
Genericize deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Apr 2, 2016
1 parent bca00a2 commit 1d5cb93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ addons:
- qt5-default
- libqt5serialport5-dev
matrix:
include:
fast_finish: true

include:
- os: osx
compiler: clang
env:
Expand All @@ -39,14 +40,18 @@ matrix:
PYTHONPATH=$PYTHONPATH:$HOME/local/lib/python2.7/site-packages
QMAKESPEC=linux-clang

allow_failures:
- os: linux
env:
PLATFORM=rpi
MNT=/home/travis/mnt

install: "./.travis/install.sh"
script: "./.travis/script.sh"
after_script: "./.travis/after_script.sh"
before_install: "[ -f ./.travis/before_install.sh ] || ./.travis/before_install.sh"
install: "[ -f ./.travis/install.sh ] || ./.travis/install.sh"
before_script: "[ -f ./.travis/before_script.sh ] || ./.travis/before_script.sh"
script: "[ -f ./.travis/script.sh ] || ./.travis/script.sh"
after_script: "[ -f ./.travis/after_script.sh ] || ./.travis/after_script.sh"

deploy:
provider: releases
api_key:
Expand Down
12 changes: 6 additions & 6 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ case "$PLATFORM" in
packthing -h

packthing -j4 --version $BUILD_VERSION dmg
mv build/staging/propelleride-*.dmg .
mv build/staging/*.dmg .
;;
"linux")
qmake -v
packthing -h

packthing -j4 run
mv build/staging/propelleride-*.run .
mv build/staging/*.run .

fakeroot packthing -j4 --version $BUILD_VERSION deb
mv build/staging/propelleride-*.deb .
mv build/staging/*.deb .
;;
"rpi")
sudo chroot $MNT uname -a
Expand All @@ -32,11 +32,11 @@ case "$PLATFORM" in

sudo packthing --checkout

sudo chroot $MNT bash -c "cd /home/travis/build/parallaxinc/PropellerIDE/ && \
sudo chroot $MNT bash -c "cd /home/travis/build/$TRAVIS_REPO_SLUG/ && \
packthing -j4 deb --version $BUILD_VERSION --arch armhf && \
mv build/staging/propelleride-*.deb ."
mv build/staging/*.deb ."

sudo chown `whoami`:`groups | sed -r 's/ .*//g'` propelleride-*.deb
sudo chown `whoami`:`groups | sed -r 's/ .*//g'` *.deb
;;
*)
echo "Invalid PLATFORM"
Expand Down

0 comments on commit 1d5cb93

Please sign in to comment.