mirror of
https://github.com/ArtemSBulgakov/buildozer-action.git
synced 2024-08-16 10:09:52 +02:00
Fix pulling when unrelated histories
This commit is contained in:
parent
5939413afb
commit
58679ab44f
1 changed files with 19 additions and 2 deletions
|
@ -65,7 +65,16 @@ os.makedirs(directory, exist_ok=True)
|
||||||
subprocess.check_call(["git", "config", "user.name", author_name])
|
subprocess.check_call(["git", "config", "user.name", author_name])
|
||||||
subprocess.check_call(["git", "config", "user.email", author_email])
|
subprocess.check_call(["git", "config", "user.email", author_email])
|
||||||
# Ensure that there are no changes
|
# Ensure that there are no changes
|
||||||
subprocess.check_call(["git", "pull", "origin", data_repository, "--ff-only"])
|
subprocess.check_call(
|
||||||
|
[
|
||||||
|
"git",
|
||||||
|
"pull",
|
||||||
|
"origin",
|
||||||
|
data_repository,
|
||||||
|
"--ff-only",
|
||||||
|
"--allow-unrelated-histories",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# Try to push several times
|
# Try to push several times
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
|
@ -86,7 +95,15 @@ for i in range(3):
|
||||||
)
|
)
|
||||||
# Pull new changes
|
# Pull new changes
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
["git", "pull", "origin", data_repository, "--force", "--ff-only"]
|
[
|
||||||
|
"git",
|
||||||
|
"pull",
|
||||||
|
"origin",
|
||||||
|
data_repository,
|
||||||
|
"--force",
|
||||||
|
"--ff-only",
|
||||||
|
"--allow-unrelated-histories",
|
||||||
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
break # Exit loop if there is no errors
|
break # Exit loop if there is no errors
|
||||||
|
|
Loading…
Reference in a new issue