-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
62 lines (62 loc) · 4.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
osx_image: xcode8.3
dist: trusty
sudo: false
language: node_js
node_js: '8'
os:
- linux
- osx
- windows
notifications:
email: false
addons:
apt:
packages:
- rpm
- libsecret-1-0
- libsecret-1-dev
- libgnome-keyring-dev
cache:
directories:
- "$HOME/.npm"
install:
- npm install [email protected]
- node_modules/.bin/npm install
before_script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then curl $CSC_LINK_WINDOWS -o cert.p12; certutil -p $CSC_KEY_PASSWORD_WINDOWS -importpfx cert.p12; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then CSC_LINK=$CSC_LINK_WINDOWS CSC_KEY_PASSWORD=$CSC_KEY_PASSWORD_WINDOWS npm run release-win; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run release-linux; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run release-osx; fi
before_deploy:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export version=$(cat package.json | grep
'"version"' | cut -d '"' -f4); if [[ "$TRAVIS_TAG" == *"-"* ]]; then export deb_distribution=unstable;
else export deb_distribution=stable; fi; if [[ "$TRAVIS_BRANCH" == "master" ]];
then export deb_distribution=nightly; fi; export date=$(date +%Y-%m-%d); cp packaging/debian/bintray.json
bintray.json; sed -i s/'{version}'/$version/g bintray.json; sed -i s/'{date}'/$date/g
bintray.json; sed -i s/'{deb_distribution}'/$deb_distribution/g bintray.json; fi;
deploy:
- provider: bintray
file: bintray.json
user: raffis
skip_cleanup: true
key:
secure: BWv8xZaOQsptR6/CJdvAOD5e7NmEH3aJ83xWfSrxwK52NN7QmSNYBXhM4gMiRvUJXMYIcu6OJhlo3W86M2YOeHGtmH1biLwFp7NxIMEQUouuMBoezg5jU47M4ydk/ro44du/Krvk6jnXHkgHDsnCknPP5RD/Z+Dd2mgTL+iNbvfvklW3pd0y1q1CiZfyaEvRl8OXUyzERnS7NsayjcGOOi5Ea4VYR87tkmXBguV6XQI0CbN9RJ1VQuipYVYevZzMAO1iHDj66nEJYT0XXBOHPUYsYP/iO4bLvXkbUxXi/WU4dQbAkLFD3jYRl3UCpaUvTBoAPooD9Vh8FCq8rUrXfL0TfJ3+awvct7ltKY+E+FiDuiAdlsj+C0uL8n4Do5MNNqE+e22/XrV/Lfhpu7K65173/p6qkJyo1NanqWQJTmmUs1oSVtU+V1Ze6Ybr3BI4J6H/djGkYiIdfLVocBA24gZGmNsi66YTIJeGfN2O1rGOKk/BsxXhnnvDg6XDAH10/kXzNKakDVRGY0DMCiSUwxkozVre0o3wvkwZfWWh6JcomlxDqbCTVLNijIkkoo1GX394wojoe7s8h9HLVHVOD//bACdq9twNc9jvfJJEVk1icygzK6BQxIY81AU6/iKfxUpJ586HGkQjPs+E/Sq5xExo6bpSOa/Ik5u0K19h/P4=
on:
condition: $TRAVIS_OS_NAME = "linux"
tags: true
after_script:
- export version=$(cat package.json | grep '"version"' | cut -d '"' -f4);
- if [[ "$TRAVIS_TAG" == *"-"* ]]; then export distribution=unstable; else export distribution=stable; fi;
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && sha256=$(shasum -a 256 dist/mac/balloon-desktop-$version-mac.pkg | cut -d ' ' -f1) && echo $sha256
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && git clone https://github.com/gyselroth/homebrew-cask
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && sed -i '' 's/sha256.*$/sha256 "'$sha256'"/g' homebrew-cask/Casks/balloon-desktop.rb
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && sed -i '' 's/version.*$/version "'$version'"/g' homebrew-cask/Casks/balloon-desktop.rb
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && sed -i '' 's/pkg.*$/pkg "'balloon-desktop-$version.pkg'"/g' homebrew-cask/Casks/balloon-desktop.rb
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && sed -i '' 's/url.*$/url "https:\/\/github.com\/gyselroth\/balloon-client-desktop\/releases\/download\/v'$version'\/balloon-desktop-'$version'.pkg"/g' homebrew-cask/Casks/balloon-desktop.rb
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && cd homebrew-cask
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && git commit --message "balloon-desktop release $version" Casks/balloon-desktop.rb
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && git remote set-url --push origin https://raffis:${GH_TOKEN}@github.com/gyselroth/homebrew-cask.git > /dev/null 2>&1
- test "$TRAVIS_TAG" != "" && test "$TRAVIS_OS_NAME" == "osx" && test "$distribution" == "stable" && git push origin master --quiet