forked from matryer/xbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (54 loc) · 2.9 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
language: objective-c
osx_image: xcode7.3
xcode_project: App/BitBar.xcodeproj
xcode_scheme: BitBar
xcode_sdk: macosx10.11
#before_install:
#- brew update
#- brew outdated xctool || brew upgrade xctool
script:
- CERT_P12=Certificate.p12
- echo "$CERT_BASE64" | base64 --decode > $CERT_P12
- KEYCHAIN=build.keychain
- security create-keychain -p travis $KEYCHAIN
- security default-keychain -s $KEYCHAIN
- security unlock-keychain -p travis $KEYCHAIN
- security set-keychain-settings -t 3600 -u $KEYCHAIN
- security import $CERT_P12 -k $KEYCHAIN -P "$CERT_PW" -T /usr/bin/codesign
- 'IDENTITY="Developer ID Application: Code and That Ltd (B3T8QSC4HG)"'
- if [ -n "$TRAVIS_TAG" ]; then xctool -project $TRAVIS_XCODE_PROJECT
-scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build
SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="$IDENTITY" build analyze; else xctool -project $TRAVIS_XCODE_PROJECT
-scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK -configuration Release OBJROOT=$PWD/build
SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO build analyze -failOnWarnings; fi
- security delete-keychain $KEYCHAIN
before_deploy:
- OUTPUTDIR="$PWD/build/Release"
- cd $OUTPUTDIR
- ditto -c -k --sequesterRsrc --keepParent "BitBar.app" "BitBar-$TRAVIS_TAG.zip"
- ditto -c -k --sequesterRsrc --keepParent "BitBarDistro.app" "BitBarDistro-$TRAVIS_TAG.zip"
deploy:
provider: releases
api_key:
secure: VB7wqPRAmwRxX1ugTss4lWdcCjMO4+9yYuvkSKIhRz5PcKFTdgIE5Ol29wssYSlEnk1D5ZqeCJBe3t2qowrxOKHWKJRxH5r4fbgYAYnbk9/nWsMLgWDn1mo4nYa0sD4GyMUDY9JqqmtBY3nZ2pYcJ0L1LmxUU+EHViwcBQz6G4Y=
file:
- $OUTPUTDIR/BitBar-$TRAVIS_TAG.zip
- $OUTPUTDIR/BitBarDistro-$TRAVIS_TAG.zip
skip_cleanup: true
on:
repo: matryer/bitbar
tags: true
after_deploy:
# Rebuild the Sparkle feed
- curl -s -X POST -H "Authorization:token $GH_TOKEN" -H Accept:application/vnd.github.mister-fantastic-preview https://api.github.com/repos/matryer/bitbar/pages/builds
# Update the Sparkle feed cache
- brew install jq
- PRERELEASE=$(curl -s -H "Authorization:token $GH_TOKEN" "https://api.github.com/repos/matryer/bitbar/releases/tags/$TRAVIS_TAG" | jq .prerelease)
- echo "$PRERELEASE"
- if [ "$PRERELEASE" = true ]; then FEED=(beta distro-beta); else FEED=(bitbar distro); fi
- while :; do STATUS=$(curl -s -H "Authorization:token $GH_TOKEN" https://api.github.com/repos/matryer/bitbar/pages | jq .status); if [ "$STATUS" != '"queued"' ] && [ "$STATUS" != '"building"' ]; then echo "$STATUS"; break; fi; sleep 1; done
- curl -s -H "X-RELOAD-KEY:$SPARKLE_UPDATE_KEY" -D - -o /dev/null "https://bitbarapp.com/feeds/${FEED[0]}/reload"
- curl -s -H "X-RELOAD-KEY:$SPARKLE_UPDATE_KEY" -D - -o /dev/null "https://bitbarapp.com/feeds/${FEED[1]}/reload"
notifications:
slack:
secure: TpJVJf/NWxDvHxPjaQJnVg4vlW6JeLQ7eWadzFo7sUNSdB7Tui703AvYjG8tZTlk2lJ/4bV4jKgz8+rSElkeGsfPLTgDU33IDmG3V9o6MrAeV/ZQL37793bj+zJFxNuOkoIBaBQt1aNDTuIDUB97MNv02Vklb1M7Yd44NRVXdHk=