Push-Skript schuetzt Workflow-Ergebnisse
This commit is contained in:
@@ -47,6 +47,11 @@ def hoch(pfad, nachricht):
|
||||
return ok
|
||||
|
||||
AUS = {'.git', '.env', 'node_modules', '__pycache__'}
|
||||
|
||||
# Diese Pfade schreiben die Workflows selbst. Wuerde das Skript sie hochladen,
|
||||
# ueberschreibt ein lokaler Altstand die Ergebnisse eines Laufs.
|
||||
NICHT_UEBERSCHREIBEN = {'artikel-index.json', 'status-importe.json'}
|
||||
NICHT_UEBERSCHREIBEN_ORDNER = ('briefe' + os.sep, 'nachbessern' + os.sep, 'artikel' + os.sep)
|
||||
dateien = []
|
||||
for wurzel, ordner, namen in os.walk('.'):
|
||||
ordner[:] = [o for o in ordner if o not in AUS]
|
||||
@@ -54,9 +59,13 @@ for wurzel, ordner, namen in os.walk('.'):
|
||||
p = os.path.relpath(os.path.join(wurzel, n), '.')
|
||||
if p in AUS or p.startswith('.env') and p != '.env.example': continue
|
||||
if p == '.env': continue
|
||||
if p in NICHT_UEBERSCHREIBEN or p.startswith(NICHT_UEBERSCHREIBEN_ORDNER):
|
||||
continue
|
||||
dateien.append(p)
|
||||
|
||||
nachricht = sys.argv[1] if len(sys.argv) > 1 else 'Update'
|
||||
print("Uebersprungen (von den Workflows gepflegt): "
|
||||
+ ', '.join(sorted(NICHT_UEBERSCHREIBEN)) + ', ' + ', '.join(NICHT_UEBERSCHREIBEN_ORDNER))
|
||||
fehler = 0
|
||||
for p in sorted(dateien):
|
||||
if not hoch(p, nachricht): fehler += 1
|
||||
|
||||
Reference in New Issue
Block a user