From a36e5aabd61f0c0d630e6a1d51a78c4928bee816 Mon Sep 17 00:00:00 2001 From: Kamil Skalski Date: Thu, 24 Sep 2026 17:13:22 +0200 Subject: [PATCH 1/2] release: bump the IDL program version Problem - version drift - both IDL files carry the interface crate version - `cargo release` bumps the manifest, so the committed files fall behind - the IDL job regenerates the files, then compares them against the tree - the job fails after every release, so someone bumps the files by hand Summary of Changes - replace the program version in both IDL files during a release, so the release commit carries them --- interface/Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/Cargo.toml b/interface/Cargo.toml index 9f67674a..072e78eb 100644 --- a/interface/Cargo.toml +++ b/interface/Cargo.toml @@ -13,6 +13,12 @@ rust-version = "1.81.0" [lib] crate-type = ["rlib"] +[package.metadata.release] +pre-release-replacements = [ + { file = "../idl.json", search = '("publicKey": "Stake11111111111111111111111111111111111111",\n "version": ")[^"]+', replace = "${1}{{version}}", exactly = 1 }, + { file = "../interface-idl.json", search = '("publicKey": "Stake11111111111111111111111111111111111111",\n "version": ")[^"]+', replace = "${1}{{version}}", exactly = 1 }, +] + [package.metadata.solana] program-id = "Stake11111111111111111111111111111111111111" From fd0effd06ce9b618e04ea1c5eee00ee5845f78dc Mon Sep 17 00:00:00 2001 From: Kamil Skalski Date: Tue, 29 Sep 2026 14:28:14 +0200 Subject: [PATCH 2/2] release: tolerate whitespace in the IDL version match Problem - the replacement pattern hardcodes the IDL's current spacing, so a reformat breaks the release Summary of Changes - match any whitespace around the `publicKey` and `version` fields --- interface/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/Cargo.toml b/interface/Cargo.toml index 072e78eb..931e08ff 100644 --- a/interface/Cargo.toml +++ b/interface/Cargo.toml @@ -15,8 +15,8 @@ crate-type = ["rlib"] [package.metadata.release] pre-release-replacements = [ - { file = "../idl.json", search = '("publicKey": "Stake11111111111111111111111111111111111111",\n "version": ")[^"]+', replace = "${1}{{version}}", exactly = 1 }, - { file = "../interface-idl.json", search = '("publicKey": "Stake11111111111111111111111111111111111111",\n "version": ")[^"]+', replace = "${1}{{version}}", exactly = 1 }, + { file = "../idl.json", search = '("publicKey":\s*"Stake11111111111111111111111111111111111111",\s*"version":\s*")[^"]+', replace = "${1}{{version}}", exactly = 1 }, + { file = "../interface-idl.json", search = '("publicKey":\s*"Stake11111111111111111111111111111111111111",\s*"version":\s*")[^"]+', replace = "${1}{{version}}", exactly = 1 }, ] [package.metadata.solana]