Giter Site home page Giter Site logo

Comments (3)

stovmascript avatar stovmascript commented on May 6, 2024

Hi @jpolo, could you provide an example of the workflow you do with RNV?

Just to be sure we're on the same page, RNV doesn't create a new version. A new version is created by the npm version command which you should be executing before RNV.

RNV uses git commit -a in only two situations:

  1. When it's executed from the "postversion" script - which is triggered by npm version. Make sure you're not running this script manually (npm run postversion). You can however, add the --never-amend option and commit the changes yourself.

  2. When it's executed with the --amend option. In this case, there is a clear intent that you want to amend the previous commit. But again, it's expected that you just executed npm version, which already guards your Git working directory the way you describe.

from react-native-version.

jpolo avatar jpolo commented on May 6, 2024

Yes we use in postversion hook with no args. I had some uncommitted unadded changes and I ran yarn version.
In the mean time I saw that we also use a custom changelog hook I'll check this one.
Nevertheless don't you think the git commit all is dangerous without a git status check before?

from react-native-version.

stovmascript avatar stovmascript commented on May 6, 2024

I see the problem now. Unlike npm version, which checks and aborts if the Git working directory is dirty, yarn version doesn't care and just makes a version commit. If you have uncommited changes to package.json, it will result in the same situation which you described. That's pretty messy of Yarn if you ask me.

RNV is relying on checks made by npm version.

Nevertheless, I guess we're gonna have to improve support for Yarn and make our own checks. In the meanwhile, using npm version should be safe, if you don't mind the missing "v" in its commit message.

from react-native-version.

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.