Skip to content

Commit 1dc4715

Browse files
author
xerik
committed
builds
1 parent 9fb3b37 commit 1dc4715

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: rust
2+
git:
3+
depth: 1
4+
branches:
5+
except:
6+
- /^untagged-.*$/
7+
- /^build-.*$/
8+
- /^v\d+\.\d+-.*$/
9+
os:
10+
- linux
11+
- osx
12+
- windows
13+
rust:
14+
- nightly
15+
cache: cargo
16+
script:
17+
- cargo build --release
18+
before_deploy: ci/before_deploy.sh
19+
deploy:
20+
provider: releases
21+
api_key:
22+
secure: dXE0376DxEK68WpC4RbujdhImF4yV2yToEa+6CbK2/fWiQ2sTp0aXzyyRX46Ty4IPBNCtHKKOn9w6F5HFTBFYBCP18pSJONnh6sbXzx1K9Cgv6Y/Ffm+SwZ9zEjC7Um/Zc09106uG0OtnbWEpQ2oevTgyH6kiBfqtIfz0tL0usJ34D/uPn03h4res7epw4gKi+3HqxVL0g+YaPTKczOa2Sj8ZrQJzJh6yM6rsHzsWY4h49x1SqDqy03+uULgyXh6jUmJz207WQtKbVGdbAECeE96id6WjcYMmFUU6f4FOdmoe1fGJl5GFwZYPc4vOl1vtYtFwh389s3na+jcLdtyX/rGRX1uy5uzzvs7ZUVWgSCbdLU5g4s12hzbvMjK8dSj8HDzdicFSlfBQdNTHT0qEeJcG2JctvocOueOar7KjyH/EH/DcRFFJSw9WFc61caQriKvWVNQgfiGAp9Gtvx7oxsIoRGdnWYvKW1sawiXsqpKMayuAcW2nLk46m7goHd0yYikIAqa7lNDVFqc7yDe2ob5RqjkUa7vRpfdGc34wTJjBbuym/TXdS26kdw31iW6nMW0wPBTO2s4CEp7PEWvxTEzvMzLILVWGROWkRMTLyN1QJRfRIFM1QsSHjDhWRXAW3kk77DABE8APsyQu6kw0TsQhKZxjs1+1N9CKyg5k90=
23+
skip_cleanup: true
24+
overwrite: true
25+
file_glob: true
26+
file: "./target/deploy/*"
27+
on:
28+
all_branches: true

ci/before_deploy.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
set -evx
3+
git config --local user.name "travisci"
4+
git config --local user.email "<>"
5+
export TRAVIS_TAG="build-$TRAVIS_BUILD_NUMBER"
6+
git tag $TRAVIS_TAG || true
7+
8+
# Output binary name
9+
name="reflow-$(date +'%Y%m%d')"
10+
11+
# Everything in this directory will be offered as download for the release
12+
mkdir -p "./target/deploy"
13+
14+
function windows {
15+
mv "target/release/reflow.exe" "target/deploy/${name}-windows-x86_64.exe"
16+
}
17+
18+
function osx {
19+
mv "./target/release/reflow" "./target/deploy/${name}-osx-$(arch)"
20+
}
21+
22+
function debian {
23+
mv "./target/release/reflow" "./target/deploy/${name}-linux-$(arch)"
24+
}
25+
26+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
27+
osx || exit
28+
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
29+
debian || exit
30+
elif [ "$TRAVIS_OS_NAME" == "windows" ]; then
31+
windows
32+
fi

0 commit comments

Comments
 (0)