Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ target/
.claude/settings.local.json
.DS_Store
build/
release-build.sh
cn_macos
target-check
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
"unordered_set": "cpp",
"variant": "cpp",
"algorithm": "cpp",
"*.rs": "rust"
"*.rs": "rust",
"shared_mutex": "cpp",
"source_location": "cpp",
"strstream": "cpp",
"typeindex": "cpp"
},
"rust-analyzer.cargo.extraEnv": {
"CARGO_TARGET_DIR": "target-check"
}
}
185 changes: 184 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["monero-rpc", "monero-sys", "src-tauri", "swap"]
members = ["monero-rpc", "monero-rpc-pool", "monero-sys", "src-tauri", "swap"]

[profile.release]
opt-level = 0
Expand Down
26 changes: 26 additions & 0 deletions dev_scripts/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -eu

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi

VERSION=$1
TODAY=$(date +%Y-%m-%d)
echo "Bumping version to $VERSION"

# Using sed and assuming GNU sed syntax as this is for the github workflow.

# Update version in tauri.conf.json
sed -i 's/"version": "[^"]*"/"version": "'"$VERSION"'"/' src-tauri/tauri.conf.json

# Update version in Cargo.toml files
sed -i -E 's/^version = "[0-9]+\.[0-9]+\.[0-9]+"/version = "'"$VERSION"'"/' swap/Cargo.toml src-tauri/Cargo.toml

Comment on lines +18 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Include the new monero-rpc-pool crate in Cargo.toml updates
The script only bumps versions in swap/Cargo.toml and src-tauri/Cargo.toml; it omits the newly added monero-rpc-pool/Cargo.toml. Extend the invocation or glob all crates to ensure every workspace member is updated.

For example:

- sed -i -E 's/^version = "[0-9]+\.[0-9]+\.[0-9]+"/version = "'"$VERSION"'"/' swap/Cargo.toml src-tauri/Cargo.toml
+ sed -i -E 's/^version = "[0-9]+\.[0-9]+\.[0-9]+"/version = "'"$VERSION"'"/' monero-rpc-pool/Cargo.toml swap/Cargo.toml src-tauri/Cargo.toml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Update version in Cargo.toml files
sed -i -E 's/^version = "[0-9]+\.[0-9]+\.[0-9]+"/version = "'"$VERSION"'"/' swap/Cargo.toml src-tauri/Cargo.toml
# Update version in Cargo.toml files
sed -i -E 's/^version = "[0-9]+\.[0-9]+\.[0-9]+"/version = "'"$VERSION"'"/' monero-rpc-pool/Cargo.toml swap/Cargo.toml src-tauri/Cargo.toml
🤖 Prompt for AI Agents
In dev_scripts/bump-version.sh around lines 18 to 20, the version update only
targets swap/Cargo.toml and src-tauri/Cargo.toml, missing the
monero-rpc-pool/Cargo.toml file. Modify the sed command to also include
monero-rpc-pool/Cargo.toml or adjust it to update all Cargo.toml files in the
workspace, ensuring the new crate's version is bumped consistently with the
others.

# Update changelog
sed -i "s/^## \\[Unreleased\\]/## [$VERSION] - $TODAY/" CHANGELOG.md
# Add a new [Unreleased] section at the top
sed -i '3i## [Unreleased]\n' CHANGELOG.md

Comment on lines +21 to +25
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Fix CHANGELOG insertion syntax
The sed -i '3i## [Unreleased]\n' will insert a literal \n. Use the proper i command with an escaped newline so sed inserts the new heading on its own line:

- sed -i '3i## [Unreleased]\n' CHANGELOG.md
+ sed -i '3i\
## [Unreleased]
' CHANGELOG.md
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Update changelog
sed -i "s/^## \\[Unreleased\\]/## [$VERSION] - $TODAY/" CHANGELOG.md
# Add a new [Unreleased] section at the top
sed -i '3i## [Unreleased]\n' CHANGELOG.md
# Update changelog
sed -i "s/^## \\[Unreleased\\]/## [$VERSION] - $TODAY/" CHANGELOG.md
# Add a new [Unreleased] section at the top
sed -i '3i\
## [Unreleased]
' CHANGELOG.md
🤖 Prompt for AI Agents
In dev_scripts/bump-version.sh around lines 21 to 25, the sed command inserting
the new [Unreleased] section uses a literal \n which does not create a new line.
Replace the sed insertion command with the proper syntax using a backslash
followed by an actual newline character after the i command to ensure the
heading is inserted on its own line.

echo "Updated all files to version $VERSION."
Loading