Code Monkey home page Code Monkey logo

capacitor-set-version's People

Contributors

akomelj avatar bosh-code avatar dependabot[bot] avatar dkrepsky avatar iamso avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

capacitor-set-version's Issues

Version 2.x.x : Removed reading the version from package.json

Hello @DKrepsky

First of all, thank you for your amazing work, I use your plugin every day ❤️

In my case I use an other self made program to manage my version number and update the package.json file (among others), then your plugin to sends this version to all my capacitor sub-projects.

So, the breaking change Version 2.x.x : Removed reading the version from package.json is quite cumbersome.
Here I am, kindly asking you to re-integrate this feature !

Please note that currently I simply did non update to the latest version, but using your plugin gives me a peace of mind in case something about Android, iOS, Capacitor changes and breaks my deployment chain.

Error: Invalid android settings: null:null

Running npx capacitor-set-version -v 1.2.3 ./ on a ionic/capacitor project results in:

❯ npx capacitor-set-version -v 1.2.3 ./
version: 1.2.3
 ›   Error: Invalid android settings: null:null

It seems that it is trying to access a value that is not in the configuration, resulting in the null response. It would be nice if this tool could mention what it is looking for, so it can be added.

Feature Request: Ability to bump versions

Hello, I would like to request the ability to bump versions by using a command similar to npm patch

For example

Package.json Android iOS
1.3.4 1.0.5 1.1.0
npx capacitor-set-version --bump:all
Package.json Android iOS
1.3.5 1.0.6 1.1.1

Non-integer builds

I thought I could do something clever like:

capacitor-set-version -b $(git rev-parse --short HEAD) 

But I get back the error: Error: Expected an integer but received: 140eb04

I'm pretty sure the build for iOS doesn't need to be an integer, but I could be wrong. I'm also not sure at all about Android. If possible, any chance you can allow non-integer values for the build version?

Not work with custom paths

My capacitor.config.ts has custom path for android and ios projects

const config: CapacitorConfig = {  
  android: {
    path:'../../../capacitor/android',
  },
  ios: {
    path:'../../../capacitor/ios',
  },

When I use this package not found the folder:

Error: Invalid Android platform: folder android does not exist

This project can make the changes to use custom paths?

[Feature] Automatic build code

Hi,

I would like to use this tool for my CI build
I think this is a great tool but I was hoping to get it a bit more simplified:

  1. Allow calculation of version code from version number (cordova uses 10000 * major + 100 * minor + build)
  2. Allow setting the version name in version code for iOS - this is currently not possible for the tool at it expect integers but iOS spec allows it...

If both above are implemented the user can simply set the version only and the rest would be calculated

Legacy iOS project detected

Hello,

I am using xCode version 13.4 (latest at the moment) and @capacitor/core version 3.5.1 (also latest at the moment) and I'm getting a warning:
Warning: Legacy iOS project detected, please update to the latest xCode

What am I doing wrong here?

Thanks in advance.

capacitor.config.js is ignored

Hi

When I run npx capacitor-set-version ./ -v 1.0.0 -b 1, I get the following error message:

CustomError: Invalid CapacitorJS project: neither capacitor.config.ts nor capacitor.config.ts exist in folder ./

I have a capacitor.config.js file in the root of the project, but it seems to be ignored.
From the error message, it looks the script is trying to locate the same file twice.

Is this a bug or have you removed support for capacitor.config.js?

Thanks
Steve

Error: Invalid ios settings: $(MARKETING_VERSION)

In my Ionic project, I have this in package.json:

"scripts": {
  "capacitor:sync:before": "capacitor-set-version ."
}

(the dot is required, otherwise it complains about a missing arg: dir Capacitor project root directory, but that's not my issue).

This seems to work fine for Android, but when it gets to iOS, I get the error:

›   Error: Invalid ios settings: $(MARKETING_VERSION)

I'm running Xcode: 13.1, and some Googling seems to suggest this was a change with Xcode 11?

Have I done something wrong, or is this something that needs updating in the package?

bug npx capacitor-set-version for apple silicon

Hello,

I have a macstudio with the new Apple Silicon M1max

I have a bug in my ionic project with this command line =>
npx capacitor-set-version -a -v 1.0.0 -b 10003 ./

I have this error =>

› Error: Unexpected argument: ./
› See more help with --help

This command line is working in my other computer => macbookpro => intel

Setting build number (CFBundleVersion) as integer, xcode expecting a string

Setting the version like this:

npx capacitor-set-version -v 1.2.3 -b 1234 ./

sets the CFBundleVersion to an <integer>1234</integer>, but XCode complains until you change this back to a <string>1234</string>.

Is this expected or a bug?

I'd guess something is parsing the build number as a JS number and the plist library is applying the property value based on type.

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.