From 6c4805890b49b524974d00b29bcf27fe4498b5e6 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 11 Oct 2021 17:30:00 -0700 Subject: [PATCH] Pass rustflags consistently type: fixed --- .github/workflows/build.yaml | 2 +- bin/package | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f0e74ecc..c606c3ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ${{matrix.os}} env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: --deny warnings steps: - uses: actions/checkout@v2 diff --git a/bin/package b/bin/package index f43154a1..188df2d7 100755 --- a/bin/package +++ b/bin/package @@ -26,16 +26,13 @@ case $os in ;; esac -case $os in - ubuntu-latest | macos-latest) - cargo rustc --bin $bin --target $target --release - executable=target/$target/release/$bin - ;; - windows-latest) - cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static" - executable=target/$target/release/$bin.exe - ;; -esac +export RUSTFLAGS='--deny warnings --codegen target-feature=+crt-static' +cargo build --bin $bin --target $target --release +executable=target/$target/release/$bin + +if [[ $os == windows-2016 ]]; then + executable=$executable.exe +fi echo "Building completions..." cargo run --package gen -- --bin $executable completion-scripts