npm i --save @vulksoft/nativescript-hook-versioning
- 版本: 7.0.5
- GitHub: https://github.com/Upd4ting/nativescript-hook-versioning
- NPM: https://npmjs.net.cn/package/%40vulksoft%2Fnativescript-hook-versioning
- 下载次数
- 前一天: 0
- 上周: 0
- 上个月: 0
Nativescript Hook Versioning
此插件添加了一个钩子,执行以下操作
- 从
nativescript.config.ts
获取您的version
并将其作为versionName
放入您的AndroidManifest.xml
,并作为CFBundleShortVersionString
放入您的Info.plist
。 - 选择一个环境变量并将其作为
versionCode
放入您的AndroidManifest.xml
,并作为CFBundleVersion
放入您的Info.plist
。这允许您从 CICD 中使用环境变量并自动增加版本代码。
安装
ns plugin add nativescript-hook-versioning
用法
您可以将以下配置添加到您的 nativescript.config.ts
nativescriptHookVersioning: {
versionName: true,
versionCode: {
enabled: true,
content: 'BUNDLE_VERSION_CODE', // This can contains '+ANY_NUMBER' if you need to increment your versionCode.
},
},
以根据您的喜好进行配置。