From 196557b37704ce5481847daacb96b07fbf0b660c Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Fri, 5 Mar 2021 16:14:21 +1100 Subject: [PATCH] Rename binary to swap --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release-cli.yml | 18 +++++++++--------- swap/Cargo.toml | 3 --- swap/src/bin/{swap_cli.rs => swap.rs} | 0 4 files changed, 11 insertions(+), 14 deletions(-) rename swap/src/bin/{swap_cli.rs => swap.rs} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff4e82e0..b460f3e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,11 +60,11 @@ jobs: run: | cargo build -p swap --target ${{ matrix.target }} - - name: Upload swap_cli binary + - name: Upload swap binary uses: actions/upload-artifact@v2-preview with: name: swap-${{ matrix.target }} - path: target/${{ matrix.target }}/debug/swap_cli + path: target/${{ matrix.target }}/debug/swap - name: Upload asb binary uses: actions/upload-artifact@v2-preview diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 69c7e578..ccccae45 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -1,4 +1,4 @@ -name: "Release swap_cli" +name: "Release swap" on: release: @@ -6,7 +6,7 @@ on: jobs: release: - name: Release swap_cli + name: Release swap strategy: matrix: include: @@ -30,10 +30,10 @@ jobs: - uses: Swatinem/rust-cache@v1.2.0 - name: Build ${{ matrix.target }} release binary - run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap_cli + run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap - name: Smoke test the binary - run: target/${{ matrix.target }}/release/swap_cli --help + run: target/${{ matrix.target }}/release/swap --help # Remove once python 3 is the default - uses: actions/setup-python@v1 @@ -51,26 +51,26 @@ jobs: triple = "${{ matrix.target }}".split("-") arch = triple[0] - archive_name=f'swap_cli_${{ github.event.release.tag_name }}_{os_info.system}_{arch}.${{ matrix.archive_ext }}' + archive_name=f'swap_${{ github.event.release.tag_name }}_{os_info.system}_{arch}.${{ matrix.archive_ext }}' print(f'::set-output name=archive::{archive_name}') - name: Pack macos archive if: matrix.os == 'macos-latest' shell: bash - run: gtar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap_cli + run: gtar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap - name: Pack linux archive if: matrix.os == 'ubuntu-latest' shell: bash - run: tar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap_cli + run: tar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap - name: Pack windows archive if: matrix.os == 'windows-latest' shell: bash run: | - cp target/${{ matrix.target }}/release/swap_cli.exe ./swap_cli.exe - 7z a -tzip ${{ steps.create-archive-name.outputs.archive }} ./swap_cli.exe + cp target/${{ matrix.target }}/release/swap.exe ./swap.exe + 7z a -tzip ${{ steps.create-archive-name.outputs.archive }} ./swap.exe - name: Upload archive uses: actions/upload-release-asset@v1 diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 27958b71..2b3d8f3b 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -5,9 +5,6 @@ authors = ["CoBloX developers "] edition = "2018" description = "XMR/BTC trustless atomic swaps." -[[bin]] -name = "swap_cli" - [lib] name = "swap" diff --git a/swap/src/bin/swap_cli.rs b/swap/src/bin/swap.rs similarity index 100% rename from swap/src/bin/swap_cli.rs rename to swap/src/bin/swap.rs