Skip to content

Commit

Permalink
Fix travis deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
principis committed Jan 4, 2019
1 parent 09f8b29 commit bd5b66c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
language: csharp

addons:
apt:
packages:
- fakeroot

solution: tldr-sharp.sln
before_install:
- sudo apt-get update
- sudo apt-get install -y zip
script:
- msbuild /p:Configuration=Release tldr-sharp.sln /p:AllowedReferenceRelatedFileExtensions=none
- bash scripts/test.sh

after_success:
before_deploy:
- bash scripts/deploy.sh

deploy:
Expand All @@ -18,6 +21,7 @@ deploy:
file:
- tldr-sharp/bin/v*.tar.gz
- tldr-sharp/bin/v*.zip
- tldr-sharp/bin/*.deb
- scripts/linux_install.sh
skip_cleanup: true
on:
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

set -ex
set -e

if ([ ! -z "$TRAVIS_TAG" ]) &&
[ "$TRAVIS_PULL_REQUEST" == "false" ]; then
Expand All @@ -17,7 +17,7 @@ if ([ ! -z "$TRAVIS_TAG" ]) &&
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
mkdir -p "$tempdir/usr/lib/tldr-sharp"
cp * "$tempdir/usr/lib/tldr-sharp"
chmod 755 "$tempdir/usr/lib/tldr-sharp/*"
chmod 755 "$tempdir/usr/lib/tldr-sharp/"*

mkdir -p "$tempdir/usr/bin"
install -Dm755 "../../../scripts/debian/tldr-sharp" "$tempdir/usr/bin/tldr-sharp"
Expand All @@ -29,7 +29,7 @@ if ([ ! -z "$TRAVIS_TAG" ]) &&

sed -i "s/VERSION_PLACEHOLDER/${TRAVIS_TAG#v}/g" "$tempdir/DEBIAN/control"

fakeroot dpkg-deb --build "$tempdir" "../tldr-sharp_${version}_amd64.deb"
fakeroot dpkg-deb --build "$tempdir" "../tldr-sharp_${TRAVIS_TAG}_amd64.deb"

fi

Expand Down

0 comments on commit bd5b66c

Please sign in to comment.