-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (44 loc) · 2.12 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
language: generic
matrix:
include:
- language: rust
rust: stable
env: DEPLOY=true DEPLOY_FILE="tatsoryk-server"
- language: rust
rust: beta
- language: rust
rust: nightly
- language: node_js
node_js: "5.1"
env: DEPLOY=true DEPLOY_FILE="tatsoryk-client.tbz2"
- language: node_js
node_js: "4.2"
deploy:
provider: releases
api_key:
secure: "svEvwvzgNkIWR9Q1fEH4EMY6IiCqOypXuw93+1GiGJOvnDv+gM+77iP/Olkteglfpd0fUw1K036Rc3FFUAAadDrYqrjIwTF13aZO7Xwky/Pxsq4FfJNMyFPiaj8M+tx/K/eCHpatiJRf8kGSULdzE7KwN6yehZhJxb9ntpIwWb/HO/MjbWY2CJKT4R065aabXD6KI/lQKDSP6nRRiJNckiLV269ZOsrQcc1PIXOGRS3oqwvXjizHL2VlJuulf0RWEg+IZu00GxYtyrPL/baMPkbJUGDvZ5We1vO/X6nPmlycAYavj960eMKP9u+L7b+ECw8S+OH0BLFAwZo6iYWGUjR/WIXdJ8gjDAg1y6NQcL5CHis8IeGHlsGYLCjgikP4/imR/wUAosqTGHANqMnhCTLWCoyWLJQn+oBIbkvtKMKG9+wZUIyiuHQY9AYryAYZlztcPtam7EHjt3LxQ0I1LOO0fct0YL9UgkU9XiOjrTNM0NnTWWiQWK31/2UuyczgM65OTaQF9GYviVHhjlJ+IqqkKce6r9OJlAYfriDWgP28TW7B+M1qLC1N68QfVWfRt+IvFYDBN6rCRR+MihMf+GlKa1qctQWXVvdTTTOqNOiQvxZZsBDugvN9cFv8H3wq+DEGA3bwa9nM2/jqRggI0j3vMbbFaWpHvnZVhBLWCmo="
file: "$HOME/deploy/$DEPLOY_FILE"
skip_cleanup: true
on:
tags: true
condition: $DEPLOY = true
script:
- if [ -n "$TRAVIS_RUST_VERSION" ]; then
cd server;
cargo test;
if [ -n "$DEPLOY" ] && [ -n "$TRAVIS_TAG" ]; then
cargo build --release;
mkdir -p "$HOME/deploy";
strip --strip-all --remove-section=.comment --remove-section=.note "target/release/tatsoryk-server";
cp "target/release/tatsoryk-server" "$HOME/deploy/";
fi
fi
- if [ -n "$TRAVIS_NODE_VERSION" ]; then
cd client;
make;
if [ -n "$DEPLOY" ] && [ -n "$TRAVIS_TAG" ]; then
mkdir -p "$HOME/deploy" "$HOME/tatsoryk-client";
awk '/<script/ {print($2)}' index.html | sed -r 's:src="(.+)">.*:\1:g' | xargs cp --parents -t "$HOME/tatsoryk-client/" "index.html" "game.css";
cd "$HOME" && tar -caf "$HOME/deploy/tatsoryk-client.tbz2" "tatsoryk-client";
fi
fi