Fastlane for iOS · Git Integration | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1259223-fastlane-for-ios/lessons/37

Hi! @brian_bee,
Please I have two problems with Git integratión in my lane. I´m following your tutorial(great tutorial!!) step by step from the first part…and all lanes works fine…but now with git integration I have two problems.
I add a discussion in Fastlane git but for now, I don´t have a response…
https://github.com/fastlane/fastlane/discussions/17190#discussion-18083
I´m a little desperate

  desc "Build for AppStore submission"
    lane :build_appstore do
      ensure_git_status_clean
      ensure_git_branch(branch: "master")
      git_pull
      sync_signing_assets(type: "appstore")
      increment_build_number
      gym(
        output_directory: "build_AppStore",
        export_method: "app-store"
      )
      commit_version_bump(
        force: true,
        message: "Version bumped by fastlane"
      )
      add_git_tag(
        grouping:  "fastlane",
        build_number: lane_context[SharedValues:BUILD_NUMBER]
      )
      push_to_git_remote
  end

the first error is when using
ensure_git_status_clean
[!] Git repository is dirty! Please ensure the repo is in a clean state by committing/stashing/discarding all changes first.
But I don´t have files without committed, I don´t have anything to pull or push with my remote repository

expr $(git status --porcelain 2>/dev/null| grep "^ M" | wc -l)
0

And the other error when I comment #ensure_git_status_clean and run my lane

+------+------------------------+-------------+
|              fastlane summary               |
+------+------------------------+-------------+
| Step | Action                 | Time (in s) |
+------+------------------------+-------------+
| 1    | default_platform       | 0           |
| 2    | ensure_git_branch      | 0           |
| 3    | git_pull               | 2           |
| 4    | Switch to ios          | 0           |
|      | sync_signing_assets    |             |
|      | lane                   |             |
| 5    | Switch to ios          | 0           |
|      | sync_devices_info      |             |
|      | lane                   |             |
| 6    | register_devices       | 4           |
| 7    | match                  | 5           |
| 8    | increment_build_numbe  | 1           |
|      | r                      |             |
| 9    | gym                    | 49          |
| 💥   | commit_version_bump    | 0           |
+------+------------------------+-------------+

[00:03:07]: Fastlane finished with errors

[!] Could not find a .xcodeproj in the current repository's working directory.

I´m lost with both problems

@brian_bee Can you please help with this when you get a chance? Thank you - much appreciated! :]