diff options
| author | Teddy Wing | 2019-08-04 15:11:12 +0200 |
|---|---|---|
| committer | Teddy Wing | 2019-08-05 00:02:33 +0200 |
| commit | f9f7f7c626b7371941c515f422254c081adb68b3 (patch) | |
| tree | cb302c685fe6766c26381358cd5777727cff6ff4 /ci/before_deploy.sh | |
| parent | aadf913735a3c9a2db06dba432578b203b7bb12d (diff) | |
| download | podcast-f9f7f7c626b7371941c515f422254c081adb68b3.tar.bz2 | |
Deploy releases to GitHub from TravisCIHEAD0.12.1-betamaster
Diffstat (limited to 'ci/before_deploy.sh')
| -rw-r--r-- | ci/before_deploy.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh new file mode 100644 index 0000000..635c47e --- /dev/null +++ b/ci/before_deploy.sh @@ -0,0 +1,26 @@ +set -ex + +build_release() { + cargo build --target $TARGET --release --verbose +} + +mk_tarball() { + local tmpdir="$(mktemp -d)" + local name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET" + local release_dir="$tmpdir/$name" + + mkdir -p "$release_dir" + + cp "target/$TARGET/release/podcast" "$release_dir/podcast" + + cd "$tmpdir" + tar czf "$TRAVIS_BUILD_DIR/$name.tar.gz" "$name" + rm -rf "$tmpdir" +} + +main() { + build_release + mk_tarball +} + +main |
