Browse Source

Fix build script + cleaning of OVH instance

Phyks (Lucas Verney) 4 months ago
parent
commit
ac218e6825
5 changed files with 5 additions and 4 deletions
  1. 1
    0
      .gitignore
  2. 1
    2
      build_android.sh
  3. 0
    0
      out/.gitkeep
  4. 2
    1
      ovh_orchestrator/__main__.py
  5. 1
    1
      run.sh

+ 1
- 0
.gitignore View File

@@ -1,2 +1,3 @@
1 1
 __pycache__
2 2
 ovh_orchestrator/config.py
3
+out/

+ 1
- 2
build_android.sh View File

@@ -133,5 +133,4 @@ fi
133 133
 # Build Lineage or /e/ (takes 2 to 3 hours!)
134 134
 croot
135 135
 make clean
136
-date | tee build.log; brunch h870 | tee build.log; date | tee build.log
137
-touch ~/BUILD_DONE
136
+date | tee -a build.log && brunch h870 | tee -a build.log && date | tee -a build.log && touch ~/BUILD_DONE

+ 0
- 0
out/.gitkeep View File


+ 2
- 1
ovh_orchestrator/__main__.py View File

@@ -95,10 +95,11 @@ if __name__ == '__main__':
95 95
             '/cloud/project/' + config.ovh_public_cloud_project + '/instance',
96 96
             region=config.ovh_public_cloud_region,
97 97
         )
98
+        print(result)
98 99
         instance_id = next(
99 100
             x['id']
100 101
             for x in result
101
-            if sys.argv[2] in x['ipAddresses']
102
+            if sys.argv[2] in [x['ip'] for x in x['ipAddresses']]
102 103
         )
103 104
 
104 105
         # Delete instance

+ 1
- 1
run.sh View File

@@ -38,7 +38,7 @@ done
38 38
 set -e
39 39
 
40 40
 # Fetch back the built images
41
-rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -azr --progress ubuntu@${IP_ADDRESS}:~/android/lineage/out/target/product/h870/\*.{zip,md5sum,img} .
41
+#rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -azr --progress ubuntu@${IP_ADDRESS}:~/android/lineage/out/target/product/h870/\*.{zip,md5sum,img} out/
42 42
 
43 43
 # Purge the OVH instance
44 44
 ./.venv/bin/python3 -m ovh_orchestrator purge ${IP_ADDRESS}