hausenntechnologies / capacitor-set-version Goto Github PK
View Code? Open in Web Editor NEWcapacitor-set-version
License: MIT License
capacitor-set-version
License: MIT License
Running: npx capacitor-set-version set:ios -v 1.2.3 -b 4.5.6 ./
Results: Error: Expected an integer but received: 4.5.6
Apple's Spec: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
This key is a machine-readable string composed of one to three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods.
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.
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.
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 |
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?
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?
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:
If both above are implemented the user can simply set the version only and the rest would be calculated
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.
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
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?
This is a nice npm package! Well done
It would be even cool if it sync'd the version number you set via capacitor-set-version
to the package.json version
.
on latest v2.0.0 it seems the issue 159 has been reopen because the value of CFBundleVersion showing as and because of that it resulted to iOS App Crash.
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 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.