Browse Source

Publishing fixes

Giulio 6 years ago
parent
commit
3b3cc94203
1 changed files with 9 additions and 3 deletions
  1. 9 3
      apkdroid.py

+ 9 - 3
apkdroid.py

@@ -89,9 +89,15 @@ def build(repo):
 
 def publish(repo, davoptions):
 	client = wc.Client(davoptions)
-	files = [f for f in os.listdir('.') if os.path.isfile(f)]
-	for file in files:
-		client.upload_sync(remote_path="/" + file, local_path=file)
+	files = os.listdir('repo/')
+        for file in files:
+                if  os.path.isfile(file):
+		    client.upload_sync(remote_path="/repo/" + file, local_path="repo/" +file)
+
+        for size in ['/', '-120/', '-160/', '-240/', '-320/', '-480/', '-640/']:
+                files = os.listdir('repo/icons' + size)
+                for file in files:
+                        client.upload_sync(remote_path="/repo/icons" + size + file, local_path="repo/icons" + size + file)
 
 def main():
 	check_env(repo)