Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workspace dependents on release #101

Merged
merged 10 commits into from
Apr 21, 2019
Merged

Update workspace dependents on release #101

merged 10 commits into from
Apr 21, 2019

Conversation

epage
Copy link
Collaborator

@epage epage commented Mar 30, 2019

Fixes #77

This includes switching to CLI arguments using enum where possible. The downside to arg_enum! is that --help will show the names in uppercase and accepts them case insensitively which is uncommon in CLIs. We probably want to eventually roll our own set of impls rather than relying on arg_enum!

@epage epage marked this pull request as ready for review April 4, 2019 18:14
@epage epage requested a review from sunng87 April 4, 2019 18:14
@@ -54,6 +55,7 @@ impl Default for Config {
disable_tag: false,
enable_features: vec![],
enable_all_features: false,
dependent_version: Default::default(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not a fan of this config flag name but couldn't think of a better one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree it needs a better and simple name to understand.

Should we block merging based on the name being less than desirable? If so, how do we overcome this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Never mind. We can keep using this name in beta versions until we come up with a better one.

@@ -363,6 +422,10 @@ struct ReleaseOpt {
/// Do not create git tag
skip_tag: bool,

#[structopt(long = "dependent-version", raw(possible_values = "&config::DependentVersion::variants()", case_insensitive = "true"))]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not a fan of this CLI flag name but couldn't come up with a better one

if version.is_prerelease() {
version.pre.clear();
need_commit = true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

When using default patch level on pre-release it works exact this way. I suggest not to add another Release level.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was maintaining the existing default which has different logic than patch.

Is your preference just to make patch the default instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Checked again. The default behaviour is for the case that when release failed, for example, an error on cargo publish, the version is already bumped and we have a way to rerun cargo-release. Otherwise, it makes more sense to use patch by default.

To fix the rerun issue, also mentioned in #103 , I am going to add a transaction log file like maven release, so we can always rerun the failed process.

@sunng87
Copy link
Collaborator

sunng87 commented Apr 19, 2019

Sorry for late review. The dependentVersion behaviour looks good to me and I agree it needs a better and simple name to understand.

@@ -54,6 +55,7 @@ impl Default for Config {
disable_tag: false,
enable_features: vec![],
enable_all_features: false,
dependent_version: Default::default(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Never mind. We can keep using this name in beta versions until we come up with a better one.

if version.is_prerelease() {
version.pre.clear();
need_commit = true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Checked again. The default behaviour is for the case that when release failed, for example, an error on cargo publish, the version is already bumped and we have a way to rerun cargo-release. Otherwise, it makes more sense to use patch by default.

To fix the rerun issue, also mentioned in #103 , I am going to add a transaction log file like maven release, so we can always rerun the failed process.

@sunng87 sunng87 merged commit d4fb670 into crate-ci:master Apr 21, 2019
@epage epage deleted the check branch April 21, 2019 05:11
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.

Verify / update corresponding version for path dependencies
2 participants