Comments (9)
Hi @ouadi, some feedback from my side:
- There might be an issue with package.json:
- Is it proper JSON?
- Does the script have enough permissions to read and/or write the file?
- Looks like you're using
v0.2.16
(instead of just0.2.16
) asversion
in package.json. The script will write the file back without thev
. - The
[execute]
log lines are not necessarily the exact shell commands being executed (they are for thegit
commands, but not forbump
), so you don't need to installbump
.
from release-it.
Hi @webpro
- The
package.json
is valid. The projet I'm trying to release withrelease-it
is already working fine withnpm
andgrunt
- Yes, all required permissions are there
- The version in the
package.json
is0.2.15
.release-it
was able to see it and increment it to0.2.16
. Thev
is added by thebump
command in the logs only. - I see your point. So, you are not using under the hood the
bump
command
I'm list the package.json
in question hereinafter. Is there something else I have to do/provide to help identify the source of my issue?
{
"name": "SaphirJS.utils",
"version": "0.2.15",
"private": "true",
"repository": {
"type": "git",
"url": "git://zagora/SapjirJS/utils.git"
},
"devDependencies": {
"meld": "~1.3.0",
"poly": "git://github.com/cujojs/poly.git#0.5.2",
"when": "3.1.0",
"wire": "0.10.7",
"karma": "~0.12.3",
"karma-qunit": "~0.1.1",
"karma-requirejs": "~0.2.1",
"karma-coverage": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.3",
"grunt": "~0.4.4",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"jshint-stylish": "~0.1.5",
"grunt-contrib-requirejs": "~0.4.3",
"grunt-karma": "~0.8.2",
"grunt-istanbul-coverage": "0.0.5",
"grunt-jsdoc": "~0.5.4",
"grunt-publish": "~0.0.2",
"karma-story-reporter": "~0.2.2",
"karma-mocha-reporter": "~0.2.5",
"karma-spec-reporter": "0.0.12",
"requirejs": "~2.1.11",
"grunt-contrib-copy": "~0.5.0",
"grunt-release-it": "~0.1.1"
},
"scripts": {
"install": "bower install",
"test": "grunt test"
}
}
from release-it.
Hi @webpro
I went through the source code and found the place where release-it
fails.
shell.js, lines 89 -> 97
return fn.call(fs.readFile, path.resolve(file)).then(function(data) {
var pkg = JSON.parse(data.toString());
pkg.version = version;
return pkg;
}).then(function(data) {
return fn.call(fs.writeFile, file, JSON.stringify(data, null, 2));
}).catch(function() {
log.warn('There was a problem bumping the version in ' + file);
});
Will it be possible to add the log of the raised exception in debug mode?
from release-it.
Is your project on GitHub or somewhere publicly accessible so I can check it out?
And yes, you could try this:
}).catch(function(err) {
log.warn('There was a problem bumping the version in ' + file);
log.log(err);
});
from release-it.
Sorry, the project is a propritary project. I can't share it in whole. But, I can share parts of it as needed.
For the log, yes, I would love to do it. However, I have no idea how to generate the final binary release-it
once I have done the change. Can you please point out a link that explain it?
I have done the following:
- forked
release-it
- import it to my workstation.
npm install
What I have to do to generate the final release-it
binary?
Please help.
from release-it.
You can npm link
from inside the local/forked release-it
project, and then the release-it
"binary" in there is the one that's used globally on your machine (there's no "generation" of a "binary" or something). Then you can test it on your project.
Alternatively, you can just go into the globally installed release-it
folder and hack stuf in there.
Once you've found the issue, we can see whether we need to fix something in this package or not.
from release-it.
That is perfect @webpro
I will let you know the outcome.
from release-it.
Hi @webpro
I don't know what happen exactely, but now it is working:
- I have made the change in
shell.js
and issuednpm link
- I tested with the cloned version of
release-it
and it works - I uninstall
release-it
and re-install it and ensured that the command linerelease-it
points to the newly installed version (0.0.9) - I tested and it works
So, I will close this issue for now if you agree.
One last thing: do you think it is good to log the err, in debug mode, as suggested? If yes, I'm ready to initiate a PR?
Thank you very much for your valuable time and assistance.
from release-it.
Yes, a PR would be nice, although none of us has ever seen the actual error being logged, right? Still, it wouldn't hurt, it might have saved you, or will save other folks, some time after all. Closing this one now, thanks!
from release-it.
Related Issues (20)
- Change Log Repeats HOT 3
- Discussion - Pre-releases changelog duplicating header for pre-releases header HOT 3
- NPM IP package vulnerable to Server-Side Request Forgery (SSRF) attacks HOT 3
- Release-it picks up wrong release number. HOT 8
- Bug - Issue with github comment on resolved items HOT 10
- [ERROR] GitLab CI error on NPM notice HOT 2
- Cannot understand how release verison is calculated HOT 2
- Hook for after changelog is written to CHANGELOG.md? HOT 2
- Bug: Error when rolling back git tag release suppresses original error
- Error Invalid version HOT 7
- beta and alpha releases do not work HOT 7
- When publishing an npm package, when the publishPath option is set, isCollaborator should detect package.json under publishPath instead of the current directory. HOT 2
- Wrong documentation related to running a custom Git Push command HOT 4
- How can I change method of releasing (from "Release 0.0.1" to "v0.0.1") ? HOT 3
- How can I change parametrs from "Release 0.0.0" to "v0.0.0" after writing release-it, and publishing into repository ? HOT 7
- Return different message when requireCommitsFail is false HOT 1
- Commits to one dir generate release of another. HOT 2
- Programatic Usage: Release-Version Premature Exit HOT 1
- Can't quite get auto-changelog right in github release notes. githubRelease runs before git commit/tag HOT 8
- Can't upload github release assets without rewriting release's changelog 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 release-it.