otkmnb2783 / fastlane-plugin-android_versioning Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
If I do like described in the Example-File:
increment_version_name(app_project_dir: 'android/app', bump_type: 'patch')
I got the Error:
Your current version (patch) does not respect the format A.B.C
With this version increment_version_name and increment_version_code fails. The latter will recover but set the code to 1.
The first fails with "Your current version () does not respect the format A.B.C"
Reverting to 0.2.0 makes it work again
There is an error when we add any comments after the param value in build.gradle
.
Example:
This build.gradle
example works fine:
defaultConfig {
versionCode 2003
versionName '2.0.0.3'
}
and it returns the expected result:
๐ Current Android Version Name is: '2.0.0.3'
But when I have any comments after the param value, it returns the comment instead the param value:
defaultConfig {
versionCode 2003
versionName '2.0.0.3' //asd
}
result:
๐ Current Android Version Name is: '//asd'
Hi, this plugin works fine !
But we have a build.gradle with two flavours and so two version code and version name to manage in the same file.
Is it expected to upgrade this plugin to manage a "flavour name" parameter?
Thanks!
Hi,
Getting below exception
E: [!] Your current version () does not respect the format A.B.C
versionCode 1
versionName 0.1.0
This is the part of my build.gradle:
defaultConfig {
applicationId "com.freimuthgraf.languagepocket"
applicationIdSuffix ""
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 55
versionName "0.1.5"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
vectorDrawables.useSupportLibrary = true
}
And if I run bundle exec fastlane show_version
, I got this:
bundle exec fastlane show_version
[โ] ๐
+------------------------------------+---------+------------------------------------------------------------------+
| Used plugins |
+------------------------------------+---------+------------------------------------------------------------------+
| Plugin | Version | Action |
+------------------------------------+---------+------------------------------------------------------------------+
| fastlane-plugin-android_versioning | 0.5.0 | get_version_name get_value_from_build get_version_code |
| | | set_value_in_build increment_version_name increment_version_code |
+------------------------------------+---------+------------------------------------------------------------------+
[13:15:17]: ------------------------------
[13:15:17]: --- Step: default_platform ---
[13:15:17]: ------------------------------
[13:15:17]: Driving the lane 'android show_version' ๐
[13:15:17]: ------------------------------
[13:15:17]: --- Step: get_version_name ---
[13:15:17]: ------------------------------
[13:15:17]: 1.0
[13:15:17]: ------------------------------
[13:15:17]: --- Step: get_version_code ---
[13:15:17]: ------------------------------
[13:15:17]: 1
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | get_version_name | 0 |
| 3 | get_version_code | 0 |
+------+------------------+-------------+
[13:15:17]: fastlane.tools finished successfully ๐
Any Idea, why the plugin show the wrong version?
My App-Structure:
/
|_fastlane
|_app
|_android
...
The Lane (even tried it with /app instead of ..//app):
lane :show_version do
version = get_version_name(app_project_dir: '../**/app')
UI.message(version)
version_code = get_version_code(app_project_dir: '../**/app')
UI.message(version_code)
end
For apps generated with nativescript the output is empty:
lane :showVersion do
version = get_version_name(app_project_dir: '**/app')
UI.message("version")
UI.message(version)
version_code = get_version_code(app_project_dir: '**/app')
UI.message("version_code")
UI.message(version_code)
end
I think the version informations should be fetched from a different file not build.gradle
.
Hi,
In my build.gradle I use tab for indentation so the flavor is never found because of this line that uses only spaces and no tabs :
It should maybe use a regex like this /[ \t]+#{flavor}[ \t]+/
.
I can create a PR if you want.
Both of these errors out for me:
increment_version_code(version_code: "20")
increment_version_code(version_code: 20)
With this error:
increment_version_code.rb:12:in `run': [!] undefined method `empty?' for 20:Fixnum (NoMethodError)
I was able to get this to work though:
set_value_in_build(key: "versionCode", value: "42")
Am I calling increment_version_code
incorrectly or did I stumble upon a bug?
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.