beplus / fastlane-plugin-versioning_android

Android Versioning Plugin for Fastlane
MIT License
140 stars 25 forks source link

android_set_version_name sets versionName to empty string #9

Closed benomatis closed 2 years ago

benomatis commented 3 years ago

Fastfile

gradle_file = "./android/app/build.gradle"
android_set_version_name(
  gradle_file: gradle_file,
  bump_type: "patch"
)
version_name = android_get_version_name(gradle_file: gradle_file)
puts(version_name) # Returns an empy string

build.gradle

versionName ""

While android_set_version_code(gradle_file: gradle_file) works perfectly, no problem.

Why?

hcyildirim commented 3 years ago

I'm having the same problem, did you solve it?

benomatis commented 3 years ago

@hcyildirim I ended up setting the version using npm version and then taking it from package.json, and explicitly setting it instead of making android_set_version_name to do it like so:

  $package = load_json(json_path: "./package.json")
  $version_number = $package["version"]
  # ...
  android_set_version_name(
    gradle_file: gradle_file,
    version_name: $version_number
  )
samzmann commented 2 years ago

Any update on this issue? Running into it now...

caioremedio commented 2 years ago

Yep, same issue here. It seems bump_type doesn't work anymore.

jgsheffer commented 2 years ago

I created a pull request to fix for the empty version name and bump_type not working. I also added some additional tests around the scenarios. We'll see if it gets approved and merged.

igorlamos commented 2 years ago

Thank you @jgsheffer ... let me check and merge! I'll get back to you ASAP.

igorlamos commented 2 years ago

This should be fixed within v0.1.1.

jgsheffer commented 2 years ago

@igorlamos I don't see version 1.1 in RubyGems. Is there something else that need to be done in order to pull it in to our project?

githubbla commented 1 year ago

anybody plan to update it to 0.1.1 ? still 0.1.0

igorlamos commented 1 year ago

Sorry guys, I didn't have too much time to handle it. Let me check what's the status and update to 0.1.1.

igorlamos commented 1 year ago

Version 0.1.1 was pushed to RubyGems.

githubbla commented 1 year ago

thanks, i fixed by adding direct git cat Pluginfile

Autogenerated by fastlane

#

Ensure this file is checked in to source control!

gem 'fastlane-plugin-versioning_android', git: "https://github.com/beplus/fastlane-plugin-versioning_android.git" gem 'fastlane-plugin-telegram' gem 'fastlane-plugin-increment_version_code'