Skip to content

Commit

Permalink
create script for package
Browse files Browse the repository at this point in the history
  • Loading branch information
yutaodou committed Apr 20, 2020
1 parent 96aa61a commit 24b2375
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/todo
/.idea
/*.tar
4 changes: 1 addition & 3 deletions auto/build-macos
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/sh

TARGET=x86_64-apple-darwin
CURRENT_DIR=$(dirname "$0")
cd "$CURRENT_DIR"/..

docker volume create rust-registry
docker run -v $(pwd):/source -w /source -v rust-registry:/usr/local/cargo/registry rust sh -c "rustup target add ${TARGET} && cargo build --release --bin rtd --target ${TARGET}"
cargo build --release --target x86_64-apple-darwin
12 changes: 12 additions & 0 deletions auto/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -eu

CURRENT_DIR=$(dirname "$0")
cd "$CURRENT_DIR"/..

auto/build-macos
auto/build-linux

tar -cvf rtd-macos.tar -C target/x86_64-apple-darwin/release rtd
tar -cvf rtd-linux.tar -C target/x86_64-unknown-linux-gnu/release rtd

0 comments on commit 24b2375

Please sign in to comment.