Comments (10)
@jcornaz the json file is used to know what the latest version was and what the next version will be, so doing echo "{ \"version\": \"0.0.0\" }" > package.json
will result in creating the same version again and again.
To solve that we can add logic to do it based on the latest tag.
I added this to the V3 milestone, tasks for this issue is:
- Change
package-json
toversion-file
- Based on file extension determine on how to bump (JSON, Toml, Yaml)
- Add
version-path
so users can define which value to update - Add
skip-file
to not update any file and use GIT tags for versioning - Add
skip-tag
to not create a tag and use file for versioning
from conventional-changelog-action.
This is released in v3
from conventional-changelog-action.
Hi,
Technically speaking you should be able use any json file that looks like this:
{
"version": "1.0.0"
}
You could try the action like this:
- name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v2
with:
github-token: ${{ secrets.github_token }}
package-json: './custom.json'
from conventional-changelog-action.
Thanks for the quick answer!
Technically speaking you should be able use any json file that looks like this:
Well the tools I use don't rely on Json at all.
With gradle, my projects don't even have the version written anywhere. They rely solely on tags. (thanks to reckon)
And with cargo the version is written in a toml file like this:
[package]
version = "1.0.0"
Of course there are plenty of other build tools out there, each of them having different ways of doing things.
So I presume the answer is "no" I cannot use it for non-javascript projects?
Based on that, I would like to reformulate my question into a feature request: "Make package.json optional"
from conventional-changelog-action.
Okay thanks for the explanation, so for Gradle it would be possible to just create a json file like described above?
For cargo we can look into supporting the toml format, we could change package-json
argument to version-file
that will look into the file extension and based on that bumps the version in it accordingly.
from conventional-changelog-action.
Maybe also a nice addition would be the ability to define the path of the version, for example inside a json file the default will be version
and the default for toml will be package.version
, this way if the location of the version is on a different location you get the ability to change it.
from conventional-changelog-action.
so for Gradle it would be possible to just create a json file like described above?
Of course I could always add an echo "{ \"version\": \"0.0.0\" }" > package.json
step in my CI and delete after invoking conventional-changelog-action
. But I'd prefer to be able to configure the action with something like:
- uses: TriPSs/conventional-changelog-action@v2
with:
github-token: ${{ secrets.github_token }}
package-json: 'false'
For cargo we can look into supporting the toml format
That would be awesome!
from conventional-changelog-action.
I made a version.yaml file based the test file found in the root of the repo, can anyone elaborate on the expected format for yaml? When I use the below file, the following error occurs:
package: version: '0.0.1'
from conventional-changelog-action.
Hi @bmahlbrand, the default would be:
version: '0.0.1'
If you would like to follow the format you have than you can add the following to the action
with:
version-path: 'package.version'
from conventional-changelog-action.
Works great! Thanks for the quick answer!
from conventional-changelog-action.
Related Issues (20)
- feat!: syntax does not work HOT 8
- Retaining prior manually generated logs HOT 6
- Support for merge commits HOT 1
- How to specify the version type e.g MAJOR, PATCH, MINOR; during commit HOT 1
- Remove duplicate entries HOT 3
- Generated changelog misses commits displayed in merge changeset HOT 5
- Commits that do not follow conventional commits aren't included in the changelog at all HOT 5
- Question: Why could it not detect the next version number? HOT 15
- customise clean_changelog output HOT 2
- Warning when setting empty github-token
- Why are all commits now associated with user @acekevin HOT 8
- Bumping wrong version in pyproject.toml HOT 6
- Security: add specific file on git HOT 2
- Access previous issue as an output HOT 1
- Breaking changes not recognized when using `!` HOT 1
- Add pre-release output? HOT 2
- Elixir test case is failing HOT 1
- Preset option with "conventionalcommits" doesn't seem to work HOT 6
- The process '/usr/bin/git' failed with exit code 1 HOT 19
- Is it possible to export `contributors` list tot `output`? HOT 1
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 conventional-changelog-action.