Compare commits
2 Commits
2a3475ab6e
...
5f228dc046
Author | SHA1 | Date | |
---|---|---|---|
|
5f228dc046 | ||
|
4e07d8272e |
@ -48,6 +48,7 @@ class Git:
|
|||||||
def open(self):
|
def open(self):
|
||||||
if not self.exists():
|
if not self.exists():
|
||||||
self.git_run(["init", "--object-format=sha256", "-b", "factory"])
|
self.git_run(["init", "--object-format=sha256", "-b", "factory"])
|
||||||
|
self.git_run(["config", "lfs.allowincompletepush", "true"])
|
||||||
|
|
||||||
def is_dirty(self):
|
def is_dirty(self):
|
||||||
"""Check if there is something to commit"""
|
"""Check if there is something to commit"""
|
||||||
@ -271,13 +272,11 @@ class Git:
|
|||||||
["remote"],
|
["remote"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
).stdout.decode("utf-8"):
|
).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
|
return
|
||||||
|
|
||||||
cmd = ["push"]
|
cmd = ["push"]
|
||||||
if force:
|
if force:
|
||||||
cmd.append("-f")
|
cmd.append("-f")
|
||||||
cmd.append("origin")
|
cmd += ["origin", "--all"]
|
||||||
cmd.append("refs/heads/factory")
|
|
||||||
cmd.append("refs/heads/devel")
|
|
||||||
self.git_run(cmd)
|
self.git_run(cmd)
|
||||||
|
@ -7,8 +7,10 @@ source credentials.sh
|
|||||||
while true; do
|
while true; do
|
||||||
for i in $PWD/tasks/*; do
|
for i in $PWD/tasks/*; do
|
||||||
echo "$(date): Importing $(basename $i)"
|
echo "$(date): Importing $(basename $i)"
|
||||||
python3 ./git-importer.py -c repos/.cache $(basename $i)
|
if ! python3 ./git-importer.py -c repos/.cache $(basename $i); then
|
||||||
rm -f $i;
|
mkdir -p $PWD/failed-tasks
|
||||||
|
mv $i $PWD/failed-tasks
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
inotifywait -q -e create $PWD/tasks
|
inotifywait -q -e create $PWD/tasks
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user