Jems22 / fastlane-plugin-commit_android_version_bump

Commit a version bump of your Android project using fastlane.
MIT License
13 stars 13 forks source link

Fails if git base directory is not the same as android base folder project #7

Open otusweb opened 6 years ago

otusweb commented 6 years ago

I'm working on a react native project so my file structure is as follow:

- ios
- android/
    app/
         build.gradle

In the script I set gradle_file_folder to app while in the android directory => fastlane beta

Result: I get this error:

Found unexpected uncommited changes in the working directory. Expected these files to have changed: app/build.gradle. But found these actual changes: android/app/build.gradle. Make sure you have cleaned up the build artifacts and are only left with the changed version files at this stage in your lane, and don't touch the working directory while your lane is running. You can also use the :force option to bypass this check, and always commit a version bump regardless of the state of the working directory.

ilyakar commented 6 years ago

I have the same error. Makes this plugin unusable if user is making apps with React Native like us.

controllerdotM commented 6 years ago

This is not only an issue for React Native projects. We build native apps and use a similar file structure where the git repo's base directory is one level above the Android project folder. I am getting the same error and the only way I see around it is to change our file structure...

davidfrasch commented 6 years ago

I´m working with fastlane and CircleCi and have the same Problem....any ideas what we could do, except changing the file structure?

AlanLayt commented 5 years ago

For anyone else landing here with the same issue, using app_folder_name instead of gradle_file_folder seems to do the trick.

commit_android_version_bump(
  # gradle_file_folder:"app"
  app_folder_name: "app"
)
ilyakar commented 5 years ago

Works like a charm. Thanks @AlanLayt!

oklimberg commented 4 years ago

Hi, I will update the documentation soon, to include this information

soniyaraj commented 4 years ago

@AlanLayt I am having the same issue but using app folder does not help. Please help

passmanagerapp commented 11 months ago

@AlanLayt Hi, it is 2023 and still documentation not updated and we get the same error. Any other plugin to help us ?