Skip to content

Conversation

@davepacheco
Copy link
Collaborator

This is modeled after Dropshot's. I haven't tested it yet.

@davepacheco
Copy link
Collaborator Author

I think this is good to go. From c1f17f8, I tested a release with:

$ cargo release --allow-branch=release-tooling -vv 0.2.0
[2022-08-04T19:35:49Z DEBUG cargo_release::release] Cannot detect changes for steno because tag v0.2.0-dev is missing. Try setting `--prev-tag-name <TAG>`.
[2022-08-04T19:35:49Z DEBUG globset] built glob set; 0 literals, 1 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
[2022-08-04T19:35:50Z TRACE cargo_release::git] origin/release-tooling: c1f17f8026d645243a36e2184154e58afa1710cd
[2022-08-04T19:35:50Z TRACE cargo_release::git] merge base: c1f17f8026d645243a36e2184154e58afa1710cd
[2022-08-04T19:35:50Z INFO  cargo_release::release] Update steno to version 0.2.0
[2022-08-04T19:35:50Z DEBUG cargo_release::cargo] Change:
    --- /home/dap/steno/Cargo.toml      original
    +++ /home/dap/steno/Cargo.toml      updated
    @@ -3 +3 @@
    -version = "0.2.0-dev"
    +version = "0.2.0"
    
[2022-08-04T19:35:50Z DEBUG cargo_release::release] Updating lock file
[2022-08-04T19:35:50Z TRACE cargo_release::cmd] cd /home/dap/steno
[2022-08-04T19:35:50Z TRACE cargo_release::cmd] git commit  -am release steno 0.2.0
[2022-08-04T19:35:50Z INFO  cargo_release::release] Publishing steno
    Updating crates.io index
   Packaging steno v0.2.0-dev (/home/dap/steno)
   Verifying steno v0.2.0-dev (/home/dap/steno)
   Compiling proc-macro2 v1.0.40
   Compiling unicode-ident v1.0.1
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling autocfg v1.1.0
   Compiling libc v0.2.126
   Compiling serde_derive v1.0.139
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.139
   Compiling memchr v2.5.0
   Compiling futures-core v0.3.21
   Compiling futures-task v0.3.21
   Compiling futures-channel v0.3.21
   Compiling pin-project-lite v0.2.9
   Compiling log v0.4.17
   Compiling futures-util v0.3.21
   Compiling futures-sink v0.3.21
   Compiling semver v0.1.20
   Compiling parking_lot_core v0.9.3
   Compiling scopeguard v1.1.0
   Compiling futures-io v0.3.21
   Compiling pin-utils v0.1.0
   Compiling slab v0.4.6
   Compiling serde_json v1.0.82
   Compiling smallvec v1.9.0
   Compiling slog v2.7.0
   Compiling schemars v0.8.10
   Compiling hashbrown v0.12.2
   Compiling anyhow v1.0.58
   Compiling itoa v1.0.2
   Compiling ryu v1.0.10
   Compiling async-trait v0.1.56
   Compiling dyn-clone v1.0.6
   Compiling fixedbitset v0.4.2
   Compiling bytes v1.1.0
   Compiling once_cell v1.13.0
   Compiling lazy_static v1.4.0
   Compiling rustc_version v0.1.7
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling lock_api v0.4.7
   Compiling indexmap v1.9.1
   Compiling tokio v1.20.0
   Compiling newtype_derive v0.1.6
   Compiling getrandom v0.2.7
   Compiling time v0.1.44
   Compiling num_cpus v1.13.1
   Compiling mio v0.8.4
   Compiling socket2 v0.4.4
   Compiling signal-hook-registry v1.4.0
   Compiling parking_lot v0.12.1
   Compiling serde_derive_internals v0.26.0
   Compiling futures-macro v0.3.21
   Compiling schemars_derive v0.8.10
   Compiling tokio-macros v1.8.0
   Compiling thiserror-impl v1.0.31
   Compiling thiserror v1.0.31
   Compiling futures-executor v0.3.21
   Compiling futures v0.3.21
   Compiling uuid v1.1.2
   Compiling chrono v0.4.19
   Compiling petgraph v0.6.2
   Compiling steno v0.2.0-dev (/home/dap/steno/target/package/steno-0.2.0-dev)
    Finished dev [unoptimized + debuginfo] target(s) in 27.57s
   Uploading steno v0.2.0-dev (/home/dap/steno)
warning: aborting upload due to dry run
[2022-08-04T19:36:18Z DEBUG cargo_release::release] Creating git tag v0.2.0
[2022-08-04T19:36:18Z TRACE cargo_release::cmd] cd /home/dap/steno
[2022-08-04T19:36:18Z TRACE cargo_release::cmd] git tag v0.2.0 -a -m release steno 0.2.0
[2022-08-04T19:36:18Z INFO  cargo_release::release] Starting steno's next development iteration 0.2.1-dev
[2022-08-04T19:36:18Z DEBUG cargo_release::cargo] Change:
    --- /home/dap/steno/Cargo.toml      original
    +++ /home/dap/steno/Cargo.toml      updated
    @@ -3 +3 @@
    -version = "0.2.0-dev"
    +version = "0.2.1-dev"
    
[2022-08-04T19:36:18Z TRACE cargo_release::cmd] cd /home/dap/steno
[2022-08-04T19:36:18Z TRACE cargo_release::cmd] git commit  -am starting steno 0.2.1-dev after releasing 0.2.0
[2022-08-04T19:36:18Z WARN  cargo_release::release] Ran a `dry-run`, re-run with `--execute` if all looked good.

(note that's a dry run -- the default behavior -- and I've explicitly overridden the allowed branches for testing)

When I was happy with that I did a "real" release that skips pushing and publishing:

$ cargo release --allow-branch=release-tooling --no-publish --no-push --execute 0.2.0
Release steno 0.2.0? [y/N] 
y
[2022-08-04T19:37:01Z INFO  cargo_release::release] Update steno to version 0.2.0
[release-tooling a8dff85] release steno 0.2.0
 1 file changed, 1 insertion(+), 1 deletion(-)
[2022-08-04T19:37:01Z INFO  cargo_release::release] Starting steno's next development iteration 0.2.1-dev
[release-tooling b07e8e2] starting steno 0.2.1-dev after releasing 0.2.0
 1 file changed, 1 insertion(+), 1 deletion(-)

That created two commits:

dap@ivanova steno $ git status
On branch release-tooling
Your branch is ahead of 'origin/release-tooling' by 2 commits.
  (use "git push" to publish your local commits)

dap@ivanova steno $ git log -2 -p
commit b07e8e29ea78b524455246d182624b1fd833b083 (HEAD -> release-tooling)
Author: David Pacheco <dap@oxidecomputer.com>
Date:   Thu Aug 4 12:37:02 2022 -0700

    starting steno 0.2.1-dev after releasing 0.2.0

diff --git a/Cargo.toml b/Cargo.toml
index db9e970..1559daa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "steno"
-version = "0.2.0"
+version = "0.2.1-dev"
 edition = "2021"
 license = "Apache-2.0"
 repository = "https://github.com/oxidecomputer/steno"

commit a8dff85c1e6b9e0499098e7fe8759fb2a1c65d9c (tag: v0.2.0)
Author: David Pacheco <dap@oxidecomputer.com>
Date:   Thu Aug 4 12:37:01 2022 -0700

    release steno 0.2.0

diff --git a/Cargo.toml b/Cargo.toml
index b1e0e3f..db9e970 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "steno"
-version = "0.2.0-dev"
+version = "0.2.0"
 edition = "2021"
 license = "Apache-2.0"
 repository = "https://github.com/oxidecomputer/steno"

Those look right to me. It also created this tag:

$ git push -n --tags
To github.com:oxidecomputer/steno.git
 * [new tag]         v0.2.0 -> v0.2.0
$ git show --name-only v0.2.0
tag v0.2.0
Tagger: David Pacheco <dap@oxidecomputer.com>
Date:   Thu Aug 4 12:37:01 2022 -0700

release steno 0.2.0

commit a8dff85c1e6b9e0499098e7fe8759fb2a1c65d9c (tag: v0.2.0)
Author: David Pacheco <dap@oxidecomputer.com>
Date:   Thu Aug 4 12:37:01 2022 -0700

    release steno 0.2.0

Cargo.toml

In order to have this not mess up the (new, empty) changelog, I removed that part of the config. My plan is to:

  • get a +1 on this change
  • land it on "main"
  • cut the first release: 0.2.0
  • create and land a new PR that updates the release.toml to update the changelog next time
  • (not sure if it's worth it: cut 0.2.1 to make sure this works as expected)

@davepacheco davepacheco requested review from ahl and andrewjstone and removed request for andrewjstone August 4, 2022 19:44
@davepacheco
Copy link
Collaborator Author

Oops -- I accidentally pushed the test release commits to this branch. I'm going to force-push over it.

Copy link

@ahl ahl left a comment

Choose a reason for hiding this comment

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

looks good!

Cargo.toml Outdated
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/oxidecomputer/steno"
description = "prototype distributed saga implementation"
Copy link

Choose a reason for hiding this comment

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

when does it graduate from being a prototype? after we ship? ;-)

CHANGELOG.adoc Outdated

None.

== 0.2.0 (released 2022-08-04)
Copy link

Choose a reason for hiding this comment

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

this is in anticipation of the first release today?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup (updated to today)

@davepacheco davepacheco marked this pull request as ready for review August 5, 2022 13:29
@davepacheco davepacheco enabled auto-merge (squash) August 5, 2022 13:29
@davepacheco davepacheco merged commit c4d603f into main Aug 5, 2022
@davepacheco davepacheco deleted the release-tooling branch August 5, 2022 13:33
@davepacheco davepacheco mentioned this pull request Aug 21, 2022
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.

3 participants