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

Changelog generation should be able to generate last change untagged #17

Closed
syrm opened this issue Apr 10, 2021 · 4 comments · Fixed by #19
Closed

Changelog generation should be able to generate last change untagged #17

syrm opened this issue Apr 10, 2021 · 4 comments · Fixed by #19

Comments

@syrm
Copy link

syrm commented Apr 10, 2021

Hello,

Sometimes you want to generate the whole changelog until the last commit even if the commit is untagged.
So you can take this changelog add it to your repo, commit it, and tag the commit with the proper tag.

Exemple https://github.com/syrm/test
Generate changelog produce right now :

# Changelog

## v3.0.0 (2021-04-10)

### Bug Fixes

- add 7 (573711f)
- add 6 (9422615)

---

## v2.3.1 (2021-04-10)

### Features

- add 5 (a28a0d8)

### Bug Fixes

- add 4 (c4d6748)

---

## v2.3.0 (2021-04-10)

### Bug Fixes

- add 2 (21c0d55)

---

## v1.0.0 (2021-04-10)

---

I think it would be cool if you add an option to be able to generate the changelog of the last commit too and produce something like this :

# Changelog

## vX.X.X (2021-04-10)

### Features

- add 9 (0e02b6f)
- add 8 (31cce6f)

## v3.0.0 (2021-04-10)

### Bug Fixes

- add 7 (573711f)
- add 6 (9422615)

---

## v2.3.1 (2021-04-10)

### Features

- add 5 (a28a0d8)

### Bug Fixes

- add 4 (c4d6748)

---

## v2.3.0 (2021-04-10)

### Bug Fixes

- add 2 (21c0d55)

---

## v1.0.0 (2021-04-10)

---

With a changelog like that, it will be easy to only change X.X.X to v3.1.0, add this changelog into repository, commit it, and tag it v3.1.0

What do think about this ?
@bvieira
Copy link
Owner

bvieira commented Apr 10, 2021

I could add the result of git sv rn as the first item of changelog if there was any version change, something like:

last tag: 3.3.0

release notes

# release notes
$ git sv rn
## v3.4.0 (2021-04-10)

### Features

- add feature (2339fa3)

changelog

$ git sv cgl
# Changelog

## v3.3.0 (2021-04-10)

### Features

- update something (c711a8d)

---

changelog + next release

$ git sv cgl --add-next-version      
# Changelog

## v3.4.0 (2021-04-10)

### Features

- add feature (2339fa3)

---

## v3.3.0 (2021-04-10)

### Features

- update something (c711a8d)

---

But if the branch has no commits since last tag or only commits that doesn't bump the version, nothing will be added.

Is this ok?

@bvieira
Copy link
Owner

bvieira commented Apr 10, 2021

what happened with your repository? there is only one commit

https://github.com/syrm/test/commits

@syrm
Copy link
Author

syrm commented Apr 10, 2021

But if the branch has no commits since last tag or only commits that doesn't bump the version, nothing will be added.

Is this ok?

Seems good yes :-)

About my repository i think i forget to push, but now i pushed

bvieira added a commit that referenced this issue Apr 11, 2021
bvieira added a commit that referenced this issue Apr 11, 2021
bvieira added a commit that referenced this issue Apr 11, 2021
Feature: add next version on changelog
@bvieira bvieira linked a pull request Apr 11, 2021 that will close this issue
@bvieira
Copy link
Owner

bvieira commented Apr 11, 2021

flag add-next-version for changelog is available in version 2.2.0

@bvieira bvieira closed this as completed Apr 11, 2021
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 a pull request may close this issue.

2 participants