Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Use push_to_git_remote instead of bash-commands #16

Open
tscharke opened this issue Nov 11, 2019 · 0 comments
Open

Use push_to_git_remote instead of bash-commands #16

tscharke opened this issue Nov 11, 2019 · 0 comments

Comments

@tscharke
Copy link
Owner

To push changes back to the repository (from the workflow) I'm using some bash-commands and string-scripting-things instead of fastlane's push_to_git_remote

As you can see…

repository_uri = sh("git remote show origin | awk 'NR==2{print $3}' | sed 's/git@//g' | sed 's#https://##g'", log: false)
push_uri = "https://x-access-token:#{options[:token]}@#{repository_uri.chomp}.git"
branches = "HEAD:#{options[:git_branch_name]}"
sh("git push #{push_uri} #{branches} --tags", log: false)
I am…

  • Parsing the url to the repository
  • Create a url to the remote origin (with GITHUB_TOKEN)
  • Figure out the current branch
  • Calling a shell-command to do the "real" push

I'm not figured out the correct setup for push_to_git_remote currently to set the correct branch and (re)use GITHUB_TOKEN with this Fastlane action. It results all the time in something like fatal: could not read Username for 'https://github.com': Device not configured or access denied.

Figure out the correct setup and use push_to_git_remote, please.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant