Closed vadimbelyaev closed 12 months ago
Hi @vadimbelyaev thank you for your feedback! I agree that it should fail in this case, but I'm not sure how to get status from git push
command. In case you know how to detect a fail please tell me 🙂
@denys-meloshyn, thank you for the quick reaction!
I believe the git push
command will return a non-zero exit code if it fails and zero if it succeeds. I'm not an expert in shell scripting and I don't know the best way to program it, but I know that $?
will return the error code of the last executed command. Alternatively, there should be a way to just save the exit code to a variable and check its value later.
Hope this helps and appreciate your efforts!
If the Bitrise project is configured with an SSH key that grants only read-only access to the remote Git repository, the git push command will fail, but the step will still be marked as successful.
Steps to reproduce:
Expected result: "Git tag project version and build number" step fails and all subsequent steps that shouldn't execute if this step failed don't get executed.
Actual result: "Git tag project version and build number" finishes successfully (i.e. returns 0) but shows the git push error in the logs. All subsequent steps continue execution. For example:
Thank you so much for this useful plugin. Would be great to have this issue fixed, if possible.