Skip to content

chore: refactor version code calculation#368

Closed
m1sterc001guy wants to merge 1 commit intofedimint:masterfrom
m1sterc001guy:fdroid2
Closed

chore: refactor version code calculation#368
m1sterc001guy wants to merge 1 commit intofedimint:masterfrom
m1sterc001guy:fdroid2

Conversation

@m1sterc001guy
Copy link
Collaborator

Refactors the version code calculation and adds a release.sh script so that the releases branch will have the version code in pubspec.yml

My preference would be to backport this to the v0.5 branch after the v0.5.0 release and test with the v0.5.1 release candidates.

@@ -0,0 +1,98 @@
#!/usr/bin/env bash
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This script should also update the build.gradle.kts file

sed -i "s/^version = \".*\"/version = \"$VERSION\"/" "$PROJECT_ROOT/rust/ecashapp/Cargo.toml"
echo "Updated Cargo.toml → version: $VERSION"

# Add appstream release entry
Copy link
Member

Choose a reason for hiding this comment

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

nit: We're not in any official linux app stores (e.g. Flathub), but if later this ends up in an app store we probably don't want any of the RCs to show up, just the final release. No biggie for now though.

I think the only impact of having the RCs now is if a user looks at the AppImage they'll see a version history with RCs.

echo "Updated appstream → release $VERSION ($RELEASE_DATE)"

# Commit and tag
git -C "$PROJECT_ROOT" add pubspec.yaml rust/ecashapp/Cargo.toml "$APPSTREAM_FILE"
Copy link
Member

Choose a reason for hiding this comment

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

We'll also want to do something like

cargo check --manifest-path rust/ecashapp/Cargo.toml --target-dir rust/ecashapp/target

and make sure the Cargo.lock is included.

For reference, this is the diff for a previous version bump

ecash-app releases/v0.5 ❄ ❯ git show 1e5518f2b0cb69b9cfc30af64d89a8f542903e90
commit 1e5518f2b0cb69b9cfc30af64d89a8f542903e90 (HEAD -> releases/v0.5, tag: v0.5.0-rc.4, upstream/releases/v0.5)
Author: Brad Stachurski <bradley.stachurski@gmail.com>
Date:   Thu Feb 12 12:37:47 2026 -0700

    chore: bump version to v0.5.0-rc.4

diff --git a/pubspec.yaml b/pubspec.yaml
index 0ee0922..5635728 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
 name: ecashapp
 description: "A Fedimint Wallet"
 publish_to: 'none'
-version: 0.5.0-rc.3
+version: 0.5.0-rc.4

 environment:
   sdk: ^3.7.2
diff --git a/rust/ecashapp/Cargo.lock b/rust/ecashapp/Cargo.lock
index 02a219b..916d700 100644
--- a/rust/ecashapp/Cargo.lock
+++ b/rust/ecashapp/Cargo.lock
@@ -1280,7 +1280,7 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"

 [[package]]
 name = "ecashapp"
-version = "0.5.0-rc.3"
+version = "0.5.0-rc.4"
 dependencies = [
  "anyhow",
  "async-stream",
diff --git a/rust/ecashapp/Cargo.toml b/rust/ecashapp/Cargo.toml
index b91827c..9091d94 100644
--- a/rust/ecashapp/Cargo.toml
+++ b/rust/ecashapp/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ecashapp"
-version = "0.5.0-rc.3"
+version = "0.5.0-rc.4"
 edition = "2021"

 [lib]

# Commit and tag
git -C "$PROJECT_ROOT" add pubspec.yaml rust/ecashapp/Cargo.toml "$APPSTREAM_FILE"
git -C "$PROJECT_ROOT" commit -m "chore: bump version to $TAG"
git -C "$PROJECT_ROOT" tag "$TAG"
Copy link
Member

Choose a reason for hiding this comment

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

Let's still sign tags with git tag -a -s

@m1sterc001guy m1sterc001guy marked this pull request as draft February 24, 2026 22:09
@m1sterc001guy m1sterc001guy marked this pull request as draft February 24, 2026 22:09
@m1sterc001guy
Copy link
Collaborator Author

Closing for #384. I've incorporated the feedback over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants