Giter Site home page Giter Site logo

fastlane-plugin-commit_android_version_bump's Introduction

commit_android_version_bump plugin

fastlane Plugin Badge

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-commit_android_version_bump, add it to your project by running:

fastlane add_plugin commit_android_version_bump

About commit_android_version_bump

This Android plugins allow you to commit every modification done in your build.gradle file during the execution of a lane. In fast, it do the same as the commit_version_bump action, but for Android

Note to author: Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.

Example

Check out the example Fastfile to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins and bundle exec fastlane test.

Note to author: Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.

fastlane-plugin-commit_android_version_bump's People

Contributors

danharper avatar jems22 avatar jeremytoudic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fastlane-plugin-commit_android_version_bump's Issues

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

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.

Not working when spaces in path

When there's a space in the path of the project, the plugin will fail, as i can see in the code, there is no escaping for the path. I tried to fix it and made a pull request.

Commit not working on Travis using Github OAuth API Token

I am committing using this in my Fastfile:
commit_android_version_bump( message: "Deploying version #{version}. [skip ci]", gradle_file_folder: "app", )
and I have set CI_USER_TOKEN=my github travis token as well as
echo -e "machine github.com\n login $CI_USER_TOKEN" >> ~/.netrc in my .travis.yml

It works fine on my local machine, probably because I have a local identity set up, but on Travis I am getting the empty ident name error:
[21:00:36]: --- Step: commit_android_version_bump ---
[21:00:36]: -----------------------------------------
[21:00:36]: The commit_android_version_bump plugin will use gradle file at (app)!
[21:00:36]: $ git -C /home/travis/build/myapp/android_app/app rev-parse --show-toplevel
[21:00:36]: ▸ /home/travis/build/myapp/android_app
[21:00:36]: $ git -C /home/travis/build/myapp/android_app diff --name-only HEAD
[21:00:36]: ▸ app/build.gradle
[21:00:36]: $ git -C /home/travis/build/myapp/android_app ls-files --other --exclude-standard
-- updated = app/build.gradle
[21:00:36]: $ git -C /home/travis/build/myapp/android_app add /home/travis/build/myapp/android_app/app/build.gradle
[21:00:36]: $ git -C /home/travis/build/myapp/android_app commit -m 'Testing Travis Fastlane commits [skip ci]'
[21:00:36]: ▸ *** Please tell me who you are.
[21:00:36]: ▸ Run
[21:00:36]: ▸ git config --global user.email "[email protected]"
[21:00:36]: ▸ git config --global user.name "Your Name"
[21:00:36]: ▸ to set your account's default identity.
[21:00:36]: ▸ Omit --global to set the identity only in this repository.
[21:00:36]: ▸ fatal: empty ident name (for <travis@testing-.(none)>) not allowed
[21:00:36]: Exit status of command 'git -C /home/travis/build/myapp/android_app commit -m 'Testing Travis Fastlane commits [skip ci]
'' was 128 instead of 0.

I am using a similar plugin for my iOS project where the same setup works. Is this not supported?

commit_android_version_bump not working on Travis

Hi,

I installed commit_android_version_bump in my project and it works fine when I run locally on my Mac:

  def increment_build
    version_code = increment_version_code

    commit_android_version_bump(
      message: "[ci skip] Build bumped to #{version_code}"
    )

    branch = ENV["TRAVIS_BRANCH"] || "develop"
    push_to_git_remote(remote_branch: branch)
  end

But when I try to run on Travis, for some reason it doesn't work. It throws the error message "Could not find a build folder in the current repository's working directory".

Just FYI, my project follows a normal project structure with the app folder called app. Also, the command that I run before to increment the version code (increment_version_code) works fine, so I believe my project structure is not the issue here.

Can you help me please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.