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:
Binarybaron 2025-10-14 14:42:27 +02:00
parent c3dfbd4bb5
commit f5234f9af8
6 changed files with 20 additions and 8 deletions

View file

@ -34,18 +34,30 @@ jobs:
git config user.name "${{ secrets.BOTTY_NAME }}"
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
with:
version: ${{ github.event.inputs.version }}
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
with:
version: ${{ github.event.inputs.version }}
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
run: |
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
/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 }}"
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

View file

@ -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.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 = "3.0.0";
const MIN_ASB_VERSION = "3.2.0-rc.1";
export function providerToConcatenatedMultiAddr(provider: Maker) {
return new Multiaddr(provider.multiAddr)

View file

@ -272,7 +272,7 @@ pub enum Command {
name = "asb",
about = "Automated Swap Backend for swapping XMR for BTC",
author,
version = env!("VERGEN_GIT_DESCRIBE")
version = env!("CARGO_PKG_VERSION")
)]
pub struct RawArguments {
#[structopt(long, help = "Swap on testnet")]

View file

@ -58,7 +58,7 @@ fn initialize_tracing(json: bool, config: &Config, trace: bool) -> Result<()> {
tracing::info!(
binary = "asb",
version = env!("VERGEN_GIT_DESCRIBE"),
version = env!("CARGO_PKG_VERSION"),
os = std::env::consts::OS,
arch = std::env::consts::ARCH,
"Setting up context"

View file

@ -531,7 +531,7 @@ mod builder {
);
tracing::info!(
binary = "cli",
version = env!("VERGEN_GIT_DESCRIBE"),
version = env!("CARGO_PKG_VERSION"),
os = std::env::consts::OS,
arch = std::env::consts::ARCH,
"Setting up context"

View file

@ -292,7 +292,7 @@ where
name = "swap",
about = "CLI for swapping BTC for XMR",
author,
version = env!("VERGEN_GIT_DESCRIBE")
version = env!("CARGO_PKG_VERSION")
)]
struct Arguments {
// global is necessary to ensure that clap can match against testnet in subcommands