Closed goofballtech closed 5 years ago
@goofballtech could you share an example implementation that's not working? Alternatively maybe a screenshot of the project's directory structure and the content of bump.json
should do it.
c:\ProjectFolder> bump bump --config bump.json bump -c bump.json bump --config ./bump.json bump -c ./bump.json bump --config c:\ProjectFolder\bump.json bump -c c:\ProjectFolder\bump.json
+--\ProjectFolder | +--\src | | +-- App.vue |+-- CHANGELOG.md |+-- bump.json
{
"files": {
"src/App.vue": ["version:\\s*'([^']*)'", "version: '[version]'"],
}, // A map of `relativeFilePath: [regex, replacement, regexFlags?] | [regex, replacement, regexFlags?][]`
"version": {
"enabled": true, // Bump the version number
"initial": "2.5.0", // Initial version
"increments": ["major", "minor", "patch", "premajor", "preminor", "prepatch", "prerelease", "custom"] // List of available increments to pick from
},
"commit": {
"enabled": false, // Commit the changes automatically
"message": "Bumped version to [version]" // Template for the commit message
},
"changelog": {
"enabled": true, // Enable changelog auto-updates
"create": false, // Create the changelog file if it doesn"t exist
"open": true, // Open the changelog file after bumping
"file": "CHANGELOG.md", // Name of the changelog file
"version": "### VersionAAAAAAAAA [version]", // Template for the version line
"commit": "- [message]", // Template for the commit line
"separator": "\n" // Template for the separator between versions sections
}
}
I think I see the problem here, you're executing bump
inside c:\ProjectFolder
, but there's no c:\ProjectFolder\bump.json
, since that's stored in c:\bump.json
, right? You should execute the command from c:\
no. its in project folder. My folder structure view is just not great.
Everything is executed from within the MaintCenter folder
@goofballtech can you make a minimal setup that reproduces the problem and host it on github? (basically make an empty project with a bump.json file that reproduces the problem)
https://github.com/goofballtech/BumpTest
I tried to leave the started number at 2.5.0 to see if it was seeing bump.json. As you can see by the change log its still pushing the default 0.0.0 since i don't have a package.json file with an existing version number to parse.
It seem to be doing the same thing as my project though.
I'm not sure a project like that without an package.json file is even supported, can you add one and then try to execute bump custom v1.2.3
?
C:\MaintCenterDev\BumpTest>bump custom v1.2.3
Error: Wrong number of argument(s). Got 2, expected between 0 and 1.
Type index.js --help for help.
I think I know what the problem here is. Both bump.json
and package.json
do not contain valid JSON.
I have been using your extension for a while and am trying to transition over to this version now. I cannot get the settings in bump.json to take. No matter what i do it always just goes with the defaults. I have gone through the code as well to see how it is pulling the path but still can't get it to take my settings.
Windows 10 OS, Bump is installed and working with default values.
Tried bump.json in the root directory, tried to use the --config and -c flags at the CLI with various versions of the path to the json file. There is a good bet i am just missing something vital but it's whipping me at the moment to do something that i would think fairly straight forward.
Thanks for your assistance.