forked from HaxeFoundation/haxe.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
64 lines (56 loc) · 2.07 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
63
64
language: haxe
haxe: "3.2.1"
sudo: false
env:
global:
# deploy_key_decrypt
- secure: "Sa8BnsU2mf6TDGdaJxxOU29qKjBoVMol0eyxnMbq0LTov0oK8kujlqoRgLl5uIDzHgwLnR+FvagcbSKcMUCTINsCRbxJJPtMmtOQlrCBxHhrj/eTPJ4L69x9t7urI1MsMjW5Q+7KJ6Fm5/lEf7uD7Ktt6Doc+Y4xp8dzXNAvfcE="
before_install:
# Configure git
- git config --global user.name "TravisCI"
- git config --global user.email "[email protected]"
install:
# setup the libraries required to build
- cd $TRAVIS_BUILD_DIR
- yes | haxelib install ufront
- yes | haxelib install all
- yes | haxelib git closure https://github.com/jasononeil/closure.git patch-1
# install dev version of ufront-mvc to get unreleased feature
- git clone https://github.com/ufront/ufront-mvc.git
- cd ufront-mvc
- git checkout d7b9066f4405358aaa0e797ec7b7656c4daf46c4
- haxelib dev ufront-mvc .
# And just to make sure we have the right versions...
- haxe
- haxelib list
script:
- cd $TRAVIS_BUILD_DIR
# Create "doc/" directory so build succeeds.
- mkdir doc
# We don't really have unit tests for the website yet. Just test that a built works.
- cp src/conf/mysql.json.sample src/conf/mysql.json
- haxelib run ufront build
# Deploy to haxe.org
- if [ -n "$deploy_key_decrypt" ] && ([ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_BRANCH" = "staging" ] || [ "$TRAVIS_BRANCH" = "travis" ]); then
openssl aes-256-cbc -k "$deploy_key_decrypt" -in deploy_key.enc -out deploy_key -d;
openssl aes-256-cbc -k "$deploy_key_decrypt" -in "src/conf/mysql-haxeorg.json.enc" -out "src/conf/mysql-haxeorg.json" -d;
chmod 600 deploy_key;
eval `ssh-agent -s`;
ssh-add deploy_key;
if [ "$TRAVIS_BRANCH" = "staging" ]; then
haxelib run ufront deploy staging;
wget http://staging.haxe.org/update/manual/;
wget http://staging.haxe.org/update/site/;
else
haxelib run ufront deploy haxe.org;
wget http://haxe.org/update/manual/;
wget http://haxe.org/update/site/;
fi
fi
cache:
directories:
- deploy
addons:
ssh_known_hosts:
- haxe.org
- staging.haxe.org