This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml.disabled
51 lines (44 loc) · 2.15 KB
/
.travis.yml.disabled
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
os: osx
osx_image: xcode9.2
cache:
directories:
- $HOME/Library/Caches/Homebrew
env:
global:
- BINTRAY_ROOT_URL="https://dl.bintray.com/phpv8/bottles-tap"
BINTRAY_USER=phpv8
before_install:
- env
- xcodebuild -version
- export TARGET_FORMULA=`echo ${TRAVIS_COMMIT_MESSAGE} | perl -n -e'/^build\s+([a-z0-9-@.]+)$/ && print $1'`
- export TARGET_FORMULA_NAME=`echo $TARGET_FORMULA | tr @ :`
- env
- if [ ! -f "./Formula/${TARGET_FORMULA}.rb" ]; then echo "Target formula \"${TARGET_FORMULA}\" does not exists"; exit 1; fi
- git remote add upstream "https://[email protected]/${TRAVIS_REPO_SLUG}.git"
- git config --global user.name "Travis CI"
- git config --global user.email "[email protected]"
- unset TRAVIS
- brew tap homebrew/php
- brew tap phpv8/tap .
install: skip
script:
- brew fetch --retry --build-bottle ./Formula/${TARGET_FORMULA}.rb
- brew install --only-dependencies --build-bottle ./Formula/${TARGET_FORMULA}.rb
- brew install --verbose --build-bottle ./Formula/${TARGET_FORMULA}.rb
# - brew install --verbose --build-bottle --env=std ./Formula/${TARGET_FORMULA}.rb
- brew audit --online ./Formula/${TARGET_FORMULA}.rb || true
- brew bottle --json --root-url="${BINTRAY_ROOT_URL}" --force-core-tap ./Formula/${TARGET_FORMULA}.rb
after_success:
- ls -la
- export FORMULA_JSON=`ls | grep $TARGET_FORMULA | grep json`
- export FORMULA_BOTTLE=`ls | grep $TARGET_FORMULA | grep tar.gz`
- export FORMULA_VERSION=`echo ${FORMULA_JSON} | sed 's/.*-\([0-9\.][_0-9\.]*\)\..*/\1/'`
- env
- brew bottle --merge --write --no-commit --root-url="${BINTRAY_ROOT_URL}" $FORMULA_JSON
- git status
- git checkout ${TRAVIS_BRANCH}
- git commit -m "Build and deploy ${TARGET_FORMULA} source package [skip ci]" ./Formula
- git pull --rebase origin ${TRAVIS_BRANCH}
- git push upstream HEAD:${TRAVIS_BRANCH}
- curl -T ${FORMULA_BOTTLE} -u${BINTRAY_USER}:${BINTRAY_API_KEY} https://api.bintray.com/content/phpv8/bottles-tap/${TARGET_FORMULA_NAME}/${FORMULA_VERSION}/${FORMULA_BOTTLE}
- curl -X POST -u${BINTRAY_USER}:${BINTRAY_API_KEY} https://api.bintray.com/content/phpv8/bottles-tap/${TARGET_FORMULA_NAME}/${FORMULA_VERSION}/publish