mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-17 01:24:02 -05:00
fix: Issue where binaries would not know their own versions
- CARGO_PKG_VERSION used everywhere instead of VERGEN_GIT_DESCRIBE - Reject makers <3.2.0-rc.1
This commit is contained in:
parent
c3dfbd4bb5
commit
f5234f9af8
6 changed files with 20 additions and 8 deletions
18
.github/workflows/draft-new-release.yml
vendored
18
.github/workflows/draft-new-release.yml
vendored
|
|
@ -34,18 +34,30 @@ jobs:
|
||||||
git config user.name "${{ secrets.BOTTY_NAME }}"
|
git config user.name "${{ secrets.BOTTY_NAME }}"
|
||||||
git config user.email ${{ secrets.BOTTY_EMAIL }}
|
git config user.email ${{ secrets.BOTTY_EMAIL }}
|
||||||
|
|
||||||
- name: Bump version in Cargo.toml
|
- name: Bump version in swap/Cargo.toml
|
||||||
uses: thomaseizinger/set-crate-version@1.0.0
|
uses: thomaseizinger/set-crate-version@1.0.0
|
||||||
with:
|
with:
|
||||||
version: ${{ github.event.inputs.version }}
|
version: ${{ github.event.inputs.version }}
|
||||||
manifest: swap/Cargo.toml
|
manifest: swap/Cargo.toml
|
||||||
|
|
||||||
- name: Bump version in Cargo.toml for GUI
|
- name: Bump version in src-tauri/Cargo.toml
|
||||||
uses: thomaseizinger/set-crate-version@1.0.0
|
uses: thomaseizinger/set-crate-version@1.0.0
|
||||||
with:
|
with:
|
||||||
version: ${{ github.event.inputs.version }}
|
version: ${{ github.event.inputs.version }}
|
||||||
manifest: src-tauri/Cargo.toml
|
manifest: src-tauri/Cargo.toml
|
||||||
|
|
||||||
|
- name: Bump version in swap-asb/Cargo.toml
|
||||||
|
uses: thomaseizinger/set-crate-version@1.0.0
|
||||||
|
with:
|
||||||
|
version: ${{ github.event.inputs.version }}
|
||||||
|
manifest: swap-asb/Cargo.toml
|
||||||
|
|
||||||
|
- name: Bump version in swap-controller/Cargo.toml
|
||||||
|
uses: thomaseizinger/set-crate-version@1.0.0
|
||||||
|
with:
|
||||||
|
version: ${{ github.event.inputs.version }}
|
||||||
|
manifest: swap-controller/Cargo.toml
|
||||||
|
|
||||||
- name: Update version in tauri.conf.json for GUI
|
- name: Update version in tauri.conf.json for GUI
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/"version": "[^"]*"/"version": "${{ github.event.inputs.version }}"/' src-tauri/tauri.conf.json
|
sed -i 's/"version": "[^"]*"/"version": "${{ github.event.inputs.version }}"/' src-tauri/tauri.conf.json
|
||||||
|
|
@ -63,7 +75,7 @@ jobs:
|
||||||
curl -fsSL https://dprint.dev/install.sh | sh -s $DPRINT_VERSION
|
curl -fsSL https://dprint.dev/install.sh | sh -s $DPRINT_VERSION
|
||||||
/home/runner/.dprint/bin/dprint fmt
|
/home/runner/.dprint/bin/dprint fmt
|
||||||
|
|
||||||
git add CHANGELOG.md Cargo.lock swap/Cargo.toml src-tauri/Cargo.toml src-tauri/tauri.conf.json
|
git add CHANGELOG.md Cargo.lock swap/Cargo.toml src-tauri/Cargo.toml swap-asb/Cargo.toml swap-controller/Cargo.toml src-tauri/tauri.conf.json
|
||||||
git commit --message "Prepare release ${{ github.event.inputs.version }}"
|
git commit --message "Prepare release ${{ github.event.inputs.version }}"
|
||||||
|
|
||||||
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { isTestnet } from "store/config";
|
||||||
// const MIN_ASB_VERSION = "1.0.0-alpha.1" // First version to support new libp2p protocol
|
// const MIN_ASB_VERSION = "1.0.0-alpha.1" // First version to support new libp2p protocol
|
||||||
// const MIN_ASB_VERSION = "1.1.0-rc.3" // First version with support for bdk > 1.0
|
// const MIN_ASB_VERSION = "1.1.0-rc.3" // First version with support for bdk > 1.0
|
||||||
// const MIN_ASB_VERSION = "2.0.0-beta.1"; // First version with support for tx_early_refund
|
// const MIN_ASB_VERSION = "2.0.0-beta.1"; // First version with support for tx_early_refund
|
||||||
const MIN_ASB_VERSION = "3.0.0";
|
const MIN_ASB_VERSION = "3.2.0-rc.1";
|
||||||
|
|
||||||
export function providerToConcatenatedMultiAddr(provider: Maker) {
|
export function providerToConcatenatedMultiAddr(provider: Maker) {
|
||||||
return new Multiaddr(provider.multiAddr)
|
return new Multiaddr(provider.multiAddr)
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ pub enum Command {
|
||||||
name = "asb",
|
name = "asb",
|
||||||
about = "Automated Swap Backend for swapping XMR for BTC",
|
about = "Automated Swap Backend for swapping XMR for BTC",
|
||||||
author,
|
author,
|
||||||
version = env!("VERGEN_GIT_DESCRIBE")
|
version = env!("CARGO_PKG_VERSION")
|
||||||
)]
|
)]
|
||||||
pub struct RawArguments {
|
pub struct RawArguments {
|
||||||
#[structopt(long, help = "Swap on testnet")]
|
#[structopt(long, help = "Swap on testnet")]
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ fn initialize_tracing(json: bool, config: &Config, trace: bool) -> Result<()> {
|
||||||
|
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
binary = "asb",
|
binary = "asb",
|
||||||
version = env!("VERGEN_GIT_DESCRIBE"),
|
version = env!("CARGO_PKG_VERSION"),
|
||||||
os = std::env::consts::OS,
|
os = std::env::consts::OS,
|
||||||
arch = std::env::consts::ARCH,
|
arch = std::env::consts::ARCH,
|
||||||
"Setting up context"
|
"Setting up context"
|
||||||
|
|
|
||||||
|
|
@ -531,7 +531,7 @@ mod builder {
|
||||||
);
|
);
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
binary = "cli",
|
binary = "cli",
|
||||||
version = env!("VERGEN_GIT_DESCRIBE"),
|
version = env!("CARGO_PKG_VERSION"),
|
||||||
os = std::env::consts::OS,
|
os = std::env::consts::OS,
|
||||||
arch = std::env::consts::ARCH,
|
arch = std::env::consts::ARCH,
|
||||||
"Setting up context"
|
"Setting up context"
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ where
|
||||||
name = "swap",
|
name = "swap",
|
||||||
about = "CLI for swapping BTC for XMR",
|
about = "CLI for swapping BTC for XMR",
|
||||||
author,
|
author,
|
||||||
version = env!("VERGEN_GIT_DESCRIBE")
|
version = env!("CARGO_PKG_VERSION")
|
||||||
)]
|
)]
|
||||||
struct Arguments {
|
struct Arguments {
|
||||||
// global is necessary to ensure that clap can match against testnet in subcommands
|
// global is necessary to ensure that clap can match against testnet in subcommands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue