Coder Social home page Coder Social logo

Comments (9)

webpro avatar webpro commented on May 21, 2024

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 just 0.2.16) as version in package.json. The script will write the file back without the v.
  • The [execute] log lines are not necessarily the exact shell commands being executed (they are for the git commands, but not for bump), so you don't need to install bump.

from release-it.

ouadi avatar ouadi commented on May 21, 2024

Hi @webpro

  • The package.json is valid. The projet I'm trying to release with release-it is already working fine with npm and grunt
  • Yes, all required permissions are there
  • The version in the package.json is 0.2.15. release-it was able to see it and increment it to 0.2.16. The v is added by the bump 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.

ouadi avatar ouadi commented on May 21, 2024

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.

webpro avatar webpro commented on May 21, 2024

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.

ouadi avatar ouadi commented on May 21, 2024

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.

webpro avatar webpro commented on May 21, 2024

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.

ouadi avatar ouadi commented on May 21, 2024

That is perfect @webpro

I will let you know the outcome.

from release-it.

ouadi avatar ouadi commented on May 21, 2024

Hi @webpro

I don't know what happen exactely, but now it is working:

  • I have made the change in shell.js and issued npm 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 line release-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.

webpro avatar webpro commented on May 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.