diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6d1c7b4..1c5f6bc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,8 +4,6 @@ on: push: branches: - release - - master - - release tags: - 'latest' jobs: @@ -13,19 +11,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: openssl dependency + uses: actions/checkout@v3 + - name: Install OpenSSL dependency run: | sudo apt-get install libssl-dev - - name: Updating cargo - run: | - cargo update + - name: Update Cargo + run: cargo update - name: Build run: | cargo build --target=x86_64-unknown-linux-gnu --release - mkdir out + mkdir -p out mv -v target/x86_64-unknown-linux-gnu/release/doge out/doge_linux_64bit - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_linux @@ -34,10 +31,9 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: Updating cargo - run: | - cargo update + uses: actions/checkout@v3 + - name: Update Cargo + run: cargo update - name: Setup Dependencies run: | rustup target add aarch64-apple-darwin @@ -46,10 +42,10 @@ jobs: run: | cargo build --target=aarch64-apple-darwin --release cargo build --target=x86_64-apple-darwin --release - mkdir out + mkdir -p out mv -v target/aarch64-apple-darwin/release/doge out/doge_darwin_arm64 mv -v target/x86_64-apple-darwin/release/doge out/doge_darwin_x86_64 - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_macos @@ -58,38 +54,42 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: Setup rust - run: | - rustup target add aarch64-pc-windows-msvc + uses: actions/checkout@v3 + - name: Install Rust Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Setup Windows Dependencies + run: rustup target add aarch64-pc-windows-msvc - name: Build run: | cargo build --release --target x86_64-pc-windows-msvc - mkdir out + mkdir -p out move target\x86_64-pc-windows-msvc\release\doge.exe out\doge_windows_x86_64.exe - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_windows path: ./out/* release: - runs-on: ubuntu-latest - needs: - - build-linux - - build-windows - - build-macos - steps: - - name: Download Artifact - uses: actions/download-artifact@v4.1.7 - with: - path: ./artifacts - - name: organize files - run: | - tree artifacts - mkdir out - mv -v artifacts/**/doge_* out/ - - name: Release - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 - with: - files: ./out/doge_* + runs-on: ubuntu-latest + needs: + - build-linux + - build-windows + - build-macos + steps: + - name: Download Artifact + uses: actions/download-artifact@v3 + with: + path: ./artifacts + - name: Organize Files + run: | + mkdir -p out + mv -v artifacts/**/doge_* out/ + - name: Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: softprops/action-gh-release@v1 + with: + files: ./out/doge_* diff --git a/Cargo.lock b/Cargo.lock index 149bed1..59092d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -530,9 +530,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -1124,9 +1124,9 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zeroize" diff --git a/src/colours.rs b/src/colours.rs index 9535722..74e6d52 100644 --- a/src/colours.rs +++ b/src/colours.rs @@ -5,6 +5,7 @@ use ansi_term::Color::*; /// The **colours** are used to paint the input. +#[allow(dead_code)] #[derive(Debug, Default)] pub struct Colours { pub qname: Style, diff --git a/src/main.rs b/src/main.rs index b7e7480..1e633ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -181,7 +181,7 @@ fn disabled_feature_check(options: &Options) { use std::process::exit; use crate::connect::TransportType; - #[cfg(all(not(feature = "with_tls"), not(feature = "with_rustls_tls")))] + #[cfg(all(not(feature = "with_tls"), not(feature = "with_rustls")))] if options.requests.inputs.transport_types.contains(&TransportType::TLS) { eprintln!("doge: Cannot use '--tls': This version of dog has been compiled without TLS support"); exit(exits::OPTIONS_ERROR);