Comments (7)
Hey @ahmadawais,
You are using "package": true
which is only intended to be used when you generate a changelog during npm version
, which you are not using. This setting gets the version from your package.json
and uses that as the next incoming version, but in your case it is just the current version of your library, which is messing stuff up.
This is why you have a compare link at the top of your log that is comparing a version to itself:
### [1.34.0](https://github.com/ahmadawais/shades-of-purple-vscode/compare/1.34.0...1.34.0) RELEASE
from auto-changelog.
Ah I see now that release-it
will bump the version in package.json
and do a bunch of stuff before auto-changelog
runs. Try running it without "package": true
in the config and see if that helps.
from auto-changelog.
@cookpete thanks for the response.
Yes, using release-it
and it should handle the package.json update and as soon as it does, I want the auto-changelog
to report the release. Without package: true
it listed the changes under unreleased.
from auto-changelog.
In the next example, beforeChangelogCommand is also used, to update the CHANGELOG.md file. This change will also be included in the release commit.
{ "increment": "conventional:angular", "beforeChangelogCommand": "conventional-changelog -p angular -i CHANGELOG.md -s", "changelogCommand": "conventional-changelog -p angular | tail -n +3", "safeBump": false }For this use case, the safeBump option was introduced. Set this to false to bump package.json#version before the beforeChangelogCommand is executed, as the conventional-changelog tool needs to run from the current version.
From https://www.npmjs.com/package/release-it#generate-custom-changelog
Try removing the auto-changelog
steps from your release
script and instead add to your release-it
config:
{
"beforeChangelogCommand": "auto-changelog",
"safeBump": false
}
from auto-changelog.
@cookpete thanks for helping me out on this one.
I tried what you asked.
I released a new version 1.35.0 https://github.com/ahmadawais/shades-of-purple-vscode/releases
But the changelog is till 1.34.0 :( https://github.com/ahmadawais/shades-of-purple-vscode/blob/master/CHANGELOG.md
Here's the output
> release-it && npx vsce publish
✔ Bump version
⠦ Command (auto-changelog)23650 bytes written to CHANGELOG.md
✔ Command (auto-changelog)
✔ Init (release 1.35.0 for shades-of-purple)
✔ Git commit
✔ Git tag
✔ Git push
✔ GitHub release
✔ GitHub upload assets
✔ npm publish
✔ Done (in 46s.)
npx: installed 63 in 11.213s
Publishing [email protected]...
Successfully published [email protected]!
As you can see the bump of version was before auto-changelog was run.
I have also removed package = true
as you suggested.
from auto-changelog.
Haha sorry @ahmadawais.. Now you're doing it this way you actually need package: true
after all to use the bumped version.
from auto-changelog.
Hahah!
I think I finally figured it out. The unreleased
thingy has conflict with package
option. They don't play well together. I had to remove it.
Now I have this
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "clTemplate.hbs",
"commitLimit": false,
"package": true,
"replaceText": {
"FIX: ": "",
"NEW: ": "",
"IMPROVE: ": "",
"DOC: ": ""
}
}
And it works! Voila!
Look at these sexy changelogs
https://github.com/ahmadawais/shades-of-purple-vscode/blob/master/CHANGELOG.md
and
https://marketplace.visualstudio.com/items/ahmadawais.shades-of-purple/changelog
Thanks for all the help man. You're very kind.
from auto-changelog.
Related Issues (20)
- Feature: Add `starting-ref` and `ending-ref` option HOT 2
- Filtering back-merges and dev to main merges
- Test of releases are failing
- Support GitLab's new style routes HOT 5
- --commit-pattern option mentioned in readme doesnt exist HOT 2
- Support `--package pyproject.toml`
- Deduplicate Issues in output
- SyntaxError: Unexpected token v in JSON at position 478
- Only getting the last commit on "CHANGELOG.md" HOT 4
- Latest version on the changelog is not respecting tagPrefix HOT 1
- Questions on workflow
- Question about filtering in templates HOT 3
- Only the last tags HOT 1
- Feature Request: Debug HOT 4
- replaceText only applies to subject and not message
- `--starting-date` not working in 2024 HOT 1
- Getting undefined in generated file
- Merge url instead of commit url
- Contributor application HOT 1
- Fetching tags from GitHub Actions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-changelog.