Compare commits

...

2 Commits

Author SHA1 Message Date
Dirk Müller
5f228dc046
enable robust push 2024-05-17 21:47:35 +02:00
Dirk Müller
4e07d8272e
don't loop over failed packages 2024-05-17 21:47:15 +02:00
2 changed files with 7 additions and 6 deletions

View File

@ -48,6 +48,7 @@ class Git:
def open(self):
if not self.exists():
self.git_run(["init", "--object-format=sha256", "-b", "factory"])
self.git_run(["config", "lfs.allowincompletepush", "true"])
def is_dirty(self):
"""Check if there is something to commit"""
@ -271,13 +272,11 @@ class Git:
["remote"],
stdout=subprocess.PIPE,
).stdout.decode("utf-8"):
logger.warning("Not pushing to remote because no 'origin' configured")
logging.warning("Not pushing to remote because no 'origin' configured")
return
cmd = ["push"]
if force:
cmd.append("-f")
cmd.append("origin")
cmd.append("refs/heads/factory")
cmd.append("refs/heads/devel")
cmd += ["origin", "--all"]
self.git_run(cmd)

View File

@ -7,8 +7,10 @@ source credentials.sh
while true; do
for i in $PWD/tasks/*; do
echo "$(date): Importing $(basename $i)"
python3 ./git-importer.py -c repos/.cache $(basename $i)
rm -f $i;
if ! python3 ./git-importer.py -c repos/.cache $(basename $i); then
mkdir -p $PWD/failed-tasks
mv $i $PWD/failed-tasks
fi
done
inotifywait -q -e create $PWD/tasks
done