diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-10-08 16:17:11 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-10-12 11:19:09 +0200 |
| commit | 25ddb94ebad09a57b75a8b727636b864b74cfb00 (patch) | |
| tree | b88b7f91a290caad4a1fb6b8c068e0d16a49fdca | |
| parent | c35d13fe25e8e9d6c62db765ef1502b5c0d1957d (diff) | |
| download | mullvadvpn-25ddb94ebad09a57b75a8b727636b864b74cfb00.tar.xz mullvadvpn-25ddb94ebad09a57b75a8b727636b864b74cfb00.zip | |
Only build dependencies and binaries once with build.sh
| -rwxr-xr-x | build.sh | 12 | ||||
| -rw-r--r-- | mullvad-cli/src/main.rs | 5 | ||||
| -rwxr-xr-x | update-relays.sh | 3 |
3 files changed, 10 insertions, 10 deletions
@@ -134,21 +134,21 @@ fi ################################################################################ ./wireguard/build-wireguard-go.sh +export MULLVAD_ADD_MANIFEST="1" + echo "Building Rust code in release mode using $RUSTC_VERSION..." +cargo +stable build $CARGO_ARGS --release + if [[ ("$(uname -s)" == "Darwin") || ("$(uname -s)" == "Linux") ]]; then - pushd mullvad-cli mkdir -p "$SCRIPT_DIR/dist-assets/shell-completions" for sh in bash zsh fish; do echo "Generating shell completion script for $sh..." - cargo +stable run $CARGO_ARGS --release --features shell-completions -- \ - shell-completions "$sh" "$SCRIPT_DIR/dist-assets/shell-completions/" + cargo +stable run --bin mullvad $CARGO_ARGS --release -- shell-completions "$sh" \ + "$SCRIPT_DIR/dist-assets/shell-completions/" done - popd fi -MULLVAD_ADD_MANIFEST="1" cargo +stable build $CARGO_ARGS --release - ################################################################################ # Other work to prepare the release. ################################################################################ diff --git a/mullvad-cli/src/main.rs b/mullvad-cli/src/main.rs index 17019c0ab2..7f93e17222 100644 --- a/mullvad-cli/src/main.rs +++ b/mullvad-cli/src/main.rs @@ -57,7 +57,6 @@ async fn run() -> Result<()> { let commands = cmds::get_commands(); let app = build_cli(&commands); - #[cfg(feature = "shell-completions")] let app = app.subcommand( clap::SubCommand::with_name("shell-completions") .about("Generates completion scripts for your shell") @@ -71,12 +70,12 @@ async fn run() -> Result<()> { clap::Arg::with_name("DIR") .default_value("./") .help("Output directory where the shell completions are written"), - ), + ) + .setting(clap::AppSettings::Hidden), ); let app_matches = app.get_matches(); match app_matches.subcommand() { - #[cfg(feature = "shell-completions")] ("shell-completions", Some(sub_matches)) => { let shell = sub_matches .value_of("SHELL") diff --git a/update-relays.sh b/update-relays.sh index 2a2fde13fe..1faa54b991 100755 --- a/update-relays.sh +++ b/update-relays.sh @@ -2,4 +2,5 @@ echo "Updating relay list..." set -e -cargo run -p mullvad-rpc --bin relay_list > dist-assets/relays.json + +cargo +stable run --bin relay_list --release > dist-assets/relays.json |
