-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add devtool with build target Add openssl as vendored dependency for cross-rs/cross#229
- Loading branch information
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Note: If developing on windows, you might need to run this command to get rid of /r in this script file: | ||
# sed -i 's/\r$//' devtool | ||
# Or make sure your git has autocrlf off: https://stackoverflow.com/questions/29045140/env-bash-r-no-such-file-or-directory | ||
|
||
set -euo pipefail | ||
set -x | ||
|
||
install_cross() { | ||
cargo install cross | ||
} | ||
|
||
build() { | ||
install_cross | ||
|
||
# TODO: Once output-dir is in stable release, use that instead of copying over binaries/executables | ||
# Linux | ||
cross build --release --target x86_64-unknown-linux-gnu | ||
mv target/x86_64-unknown-linux-gnu/release/reddit_notifier bin/ | ||
|
||
# Windows | ||
rustup target add x86_64-pc-windows-msvc # Installs the target | ||
cross build --release --target x86_64-pc-windows-gnu | ||
mv target/x86_64-pc-windows-gnu/release/reddit_notifier.exe bin/ | ||
} | ||
|
||
# Comment set +x out to show commands run | ||
set +x | ||
$@ |