Skip to content

Commit

Permalink
Rename from-git flag, fixes #77
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Dec 20, 2023
1 parent b1822b5 commit 9a28138
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### BREAKING
* Update MSRV to 1.70.0

### Enhancements
* Renamed `--from-git` flag to `--publish-as-is`

## 0.2.44

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ GIT OPTIONS:
PUBLISH OPTIONS:
--allow-dirty Allow dirty working directories to be published
--from-git Publish crates from the current commit without versioning
--no-remove-dev-deps Don't remove dev-dependencies while publishing
--no-verify Skip crate verification (not recommended)
--publish-as-is Publish crates from the current commit without versioning
--registry <REGISTRY> The Cargo registry to use for publishing
--token <TOKEN> The token to use for publishing
```
Expand Down
1 change: 1 addition & 0 deletions cargo-workspaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = "MIT"
readme = "README.md"
exclude = ["tests"]
rust-version = "1.70.0"
default-run = "cargo-workspaces"

[[bin]]
name = "cargo-workspaces"
Expand Down
6 changes: 3 additions & 3 deletions cargo-workspaces/src/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub struct Publish {

/// Publish crates from the current commit without versioning
// TODO: conflicts_with = "version" (group)
#[clap(long)]
from_git: bool,
#[clap(long, alias = "from-git")]
publish_as_is: bool,

/// Skip already published crate versions
#[clap(long, hide = true)]
Expand Down Expand Up @@ -46,7 +46,7 @@ pub struct Publish {

impl Publish {
pub fn run(self, metadata: Metadata) -> Result {
let pkgs = if !self.from_git {
let pkgs = if !self.publish_as_is {
self.version
.do_versioning(&metadata)?
.iter()
Expand Down

0 comments on commit 9a28138

Please sign in to comment.