Skip to content

Commit bf0106e

Browse files
committed
Merge branch 'changelog-generation'
2 parents c77bd7a + be891e2 commit bf0106e

File tree

66 files changed

+2700
-390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2700
-390
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
810
## v0.5.0 and v0.6.0
911

1012
Maintenance release without any new features.

Cargo.lock

Lines changed: 108 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ try-publish-all: ## Dry-run publish all crates in the currently set version if t
1010
cargo run --package cargo-smart-release --bin cargo-smart-release -- smart-release gitoxide
1111

1212
try-bump-minor-version: ## Show how updating the minor version of PACKAGE=<name> would look like.
13-
cargo run --package cargo-smart-release --bin cargo-smart-release -- smart-release --update-crates-index --bump minor --skip-dependencies --skip-publish --skip-tag --skip-push -v $(PACKAGE)
13+
cargo run --package cargo-smart-release --bin cargo-smart-release -- smart-release --update-crates-index --bump minor --no-dependencies --no-publish --no-tag --no-push -v $(PACKAGE)
1414

1515
bump-minor-version: ## Similar to try-bump-minor-version, but actually performs the operation on PACKAGE=<name>
16-
cargo run --package cargo-smart-release --bin cargo-smart-release -- smart-release --update-crates-index --bump minor --skip-dependencies --skip-publish --skip-tag --skip-push -v $(PACKAGE) --execute
16+
cargo run --package cargo-smart-release --bin cargo-smart-release -- smart-release --update-crates-index --bump minor --no-dependencies --skip-publish --skip-tag --skip-push -v $(PACKAGE) --execute
1717

1818
##@ Release Builds
1919

@@ -308,6 +308,6 @@ force-update-assets: ## As update-assets, but will run git to update the baselin
308308
check-size: ## Run cargo-diet on all crates to see that they are still in bound
309309
./etc/check-package-size.sh
310310

311-
rustfmt: ## run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt
311+
fmt: ## run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt
312312
cargo +nightly fmt --all -- --config-path rustfmt-nightly.toml
313313
cargo +stable fmt --all -- --check

cargo-smart-release/CHANGELOG.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,68 @@
1-
### v0.4.0 (2021-09-??)
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## Unreleased
29

310
- Conservative pre-release version handling along with a flag to turn it off. See [this issue][194] for details.
411
- Rename `--allow-auto-publish-of-stable-crates` to `--no-auto-publish-of-stable-crates`, inverting its meaning.
512
- Add `--no-multi-crate-release` flag to return to previous default behaviour. All crate manifest changes are put into one commit.
613
- automatically bump pre-release transient dependents of published crates to prevent breakage down the road unless
714
`--no-isolate-dependencies-from-breaking-change` is set.
815

9-
[194]: https://github.com/Byron/gitoxide/issues/194
16+
## v0.3.1 (2021-09-07) - internal improvements
17+
### Thanks Clippy…
18+
19+
Clippy is a linter to help keeping code idiomatic. It was helpful 18 times in this release.
1020

11-
### v0.3.1 (2021-09-07) - internal improvements
21+
## v0.3.1 (2021-09-07)
1222

13-
### v0.3.0 (2021-08-27)
23+
## v0.3.0 (2021-08-27)
1424

1525
- add `--skip-dependencies` flag
1626
- add `--verbose` flag and be less verbose in dry-runs by default to provide only essential information
1727
- improvements to notification clarity
1828

19-
#### Breaking
29+
### Breaking
2030

2131
- Use short flag for `--no-bump-on-demand` in `--bump-dependencies`
2232

23-
### v0.2.4 (2021-08-15)
33+
### Thanks Clippy…
34+
35+
Clippy is a linter to help keeping code idiomatic. It was helpful 9 times in this release.
36+
37+
## v0.2.4 (2021-08-15)
2438

2539
- Fix auto-push functionality
2640

27-
### v0.2.3 (2021-08-15)
41+
## v0.2.3 (2021-08-15)
2842

2943
- Less verbosity by default which is helpful on the first run to get an overview. Use `--verbose/-v` for all the details.
3044
- Also push tags and HEAD by default, unless `--skip-push` is specified.
3145

32-
### v0.2.2 (2021-08-15)
46+
### Thanks Clippy…
47+
48+
Clippy is a linter to help keeping code idiomatic. It was helpful 1 time in this release.
49+
50+
## v0.2.2 (2021-08-15)
3351

3452
- support for unsorted packed-refs files
3553

36-
### v0.1.0 (2021-08-13)
54+
## v0.2.1 (2021-08-13)
55+
56+
## v0.2.0 (2021-08-13)
57+
58+
### Thanks Clippy…
59+
60+
Clippy is a linter to help keeping code idiomatic. It was helpful 1 time in this release.
61+
62+
## v0.1.0 (2021-08-13)
3763

3864
- initial release
65+
### Thanks Clippy…
66+
67+
Clippy is a linter to help keeping code idiomatic. It was helpful 2 times in this release.
68+

cargo-smart-release/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ license = "MIT OR Apache-2.0"
88
edition = "2018"
99
categories = ["development-tools::cargo-plugins"]
1010
keywords = ["cargo"]
11+
include = ["src/**/*", "README.md", "CHANGELOG.md", "!**/tests/**/*"]
1112

1213
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1314

1415
[[bin]]
1516
name = "cargo-smart-release"
1617
path = "src/cli/main-smart-release.rs"
18+
test = false
1719

1820
[[bin]]
1921
name = "cargo-changelog"
2022
path = "src/cli/main-changelog.rs"
23+
test = false
2124

2225
[features]
2326
cache-efficiency-debug = ["git-repository/cache-efficiency-debug"]
@@ -35,3 +38,9 @@ crates-index = "0.17.0"
3538
cargo_toml = "0.9.2"
3639
nom = { version = "7", default-features = false, features = ["std"]}
3740
git-conventional = "0.10.3"
41+
time = "0.3.2"
42+
pulldown-cmark = "0.8.0"
43+
44+
[dev-dependencies]
45+
insta = "1.8.0"
46+
git-testtools = { path = "../tests/tools"}

cargo-smart-release/src/bat.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
use std::{io, path::Path, process::Command};
2+
3+
pub struct Support {
4+
bat_found: bool,
5+
}
6+
7+
impl Default for Support {
8+
fn default() -> Self {
9+
Self::new()
10+
}
11+
}
12+
13+
impl Support {
14+
pub fn new() -> Self {
15+
Support {
16+
bat_found: Command::new("bat").arg("--version").output().is_ok(),
17+
}
18+
}
19+
20+
pub fn display_to_tty(&self, path: &Path) -> io::Result<()> {
21+
if !self.bat_found {
22+
log::info!(
23+
"Would want to use 'bat' for colored preview of '{}', but it wasn't available in the PATH.",
24+
path.display()
25+
);
26+
return Ok(());
27+
}
28+
if Command::new("bat")
29+
.args(&["--paging=always", "-l=md"])
30+
.arg(path)
31+
.status()?
32+
.success()
33+
{
34+
Ok(())
35+
} else {
36+
Err(io::Error::new(io::ErrorKind::Other, "bat exited with an error"))
37+
}
38+
}
39+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+

0 commit comments

Comments
 (0)