diff --git a/Cargo.toml b/Cargo.toml index 8b4d6c3..43cc92d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "signer" -version = "0.0.23" +version = "0.0.24" edition = "2021" license = "MIT" description = "Attended Nostr signing daemon — Rust port of n_signer" diff --git a/increment_and_push.sh b/increment_and_push.sh index 39a4424..d17f7b0 100755 --- a/increment_and_push.sh +++ b/increment_and_push.sh @@ -145,6 +145,17 @@ git_commit_and_push() { print_warning "No changes to commit" fi + # Tag AFTER committing so the tag points at the release commit itself, + # not its parent. (Tagging before the commit caused every tag to lag by + # one commit.) + if git tag "$NEW_VERSION" > /dev/null 2>&1; then + print_success "Created tag: $NEW_VERSION" + else + git tag -d "$NEW_VERSION" > /dev/null 2>&1 || true + git tag "$NEW_VERSION" > /dev/null 2>&1 + print_success "Recreated tag: $NEW_VERSION" + fi + git push git push origin "$NEW_VERSION" 2>/dev/null || git push --force origin "$NEW_VERSION" 2>/dev/null || true } @@ -271,13 +282,6 @@ main() { if [[ "$RELEASE_MODE" == true ]]; then increment_version "$VERSION_INCREMENT_TYPE" - if git tag "$NEW_VERSION" > /dev/null 2>&1; then - print_success "Created tag: $NEW_VERSION" - else - git tag -d "$NEW_VERSION" > /dev/null 2>&1 || true - git tag "$NEW_VERSION" > /dev/null 2>&1 - fi - if ! build_release_binary; then print_error "Release build failed; aborting before push/upload" exit 1 @@ -313,13 +317,6 @@ main() { else increment_version "$VERSION_INCREMENT_TYPE" - if git tag "$NEW_VERSION" > /dev/null 2>&1; then - print_success "Created tag: $NEW_VERSION" - else - git tag -d "$NEW_VERSION" > /dev/null 2>&1 || true - git tag "$NEW_VERSION" > /dev/null 2>&1 - fi - git_commit_and_push print_success "Increment and push completed: $NEW_VERSION" fi diff --git a/src/lib.rs b/src/lib.rs index fcfbdb5..cbd8d04 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,4 +31,4 @@ pub mod error; pub use error::SignerError; /// Version string (matches C NSIGNER_VERSION). -pub const VERSION: &str = "v0.0.23"; +pub const VERSION: &str = "v0.0.24";