Giter Site home page Giter Site logo

Comments (8)

DanGDroid avatar DanGDroid commented on May 5, 2024 1

👍
that was it - an extra postversion, i removed it and excect. npm version patch and after that
react-native-version and all results as expected.
thanx mate.

from react-native-version.

stovmascript avatar stovmascript commented on May 5, 2024

Hey @DanGDroid, I tried your script. The problem is that you're not changing your package.json version prior to using RNV. RNV itself doesn't do any versioning, except for incrementing build numbers. You should use npm version somewhere in your script, or Fastlane before executing react-native-version.

from react-native-version.

DanGDroid avatar DanGDroid commented on May 5, 2024

@stovmascript
thanx for replying,
but if i use npm version it bumps the android and ios build numbers the same as react-native-version does - ending up with bumping twice (except of packeversion and thus android versionName)
any solution?

from react-native-version.

stovmascript avatar stovmascript commented on May 5, 2024

npm version doesn't touch your Android and iOS code, it only updates your package.json version key. react-native-version then takes this new value and updates your code in android/ and ios/ to reflect the version change.

If you don't bump your package.json version, versionName will not be changed.

from react-native-version.

DanGDroid avatar DanGDroid commented on May 5, 2024

i executed npm version patch on shell in my RN project and packge.json version bumpt,
and Android build.gradle versionCode was bumpt, and IOS info.plist CFBundleVersion was bumpt as well.
without using react-native-version
probably i'm missing something.

from react-native-version.

stovmascript avatar stovmascript commented on May 5, 2024

Have you by any chance set up the postversion npm-script? That's the only way I can think of for those values to be updated automatically.

Edit: If you want to use the CLI, don't use the npm-script.

from react-native-version.

DanGDroid avatar DanGDroid commented on May 5, 2024

postversion was set by react-native-version,
this is in my package.json:

"postversion": "react-native-version",
"build-android": "react-native-version --target android --never-amend && cd android/ && fastlane beta"

from react-native-version.

stovmascript avatar stovmascript commented on May 5, 2024

RNV only reads your package.json, so you must have added that yourself. If you remove the "postversion" script, your custom script should work as expected.

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.