Tactility script improvements (#25)
Compile from a different folder. Remove duplicate copies of tactility.py This updates tactility.py to v3.5.0
This commit is contained in:
committed by
GitHub
parent
fdb2e09b6c
commit
d799c881aa
@@ -15,10 +15,10 @@ runs:
|
|||||||
uses: espressif/esp-idf-ci-action@v1
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
with:
|
with:
|
||||||
esp_idf_version: v5.5
|
esp_idf_version: v5.5
|
||||||
path: ./Apps/${{ inputs.app_name }}
|
path: .
|
||||||
# The export reset prevents an error when building other targets
|
# The export reset prevents an error when building other targets
|
||||||
# The default environment variable is set to "esp32" by the GitHub Action
|
# The default environment variable is set to "esp32" by the GitHub Action
|
||||||
command: 'export IDF_TARGET= && python tactility.py build'
|
command: 'export IDF_TARGET= && python tactility.py Apps/${{ inputs.app_name }} build'
|
||||||
- name: 'Upload Artifact'
|
- name: 'Upload Artifact'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../tactility.py
|
|
||||||
+20
-2
@@ -13,7 +13,7 @@ import tarfile
|
|||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
ttbuild_path = ".tactility"
|
ttbuild_path = ".tactility"
|
||||||
ttbuild_version = "3.4.0"
|
ttbuild_version = "3.5.0"
|
||||||
ttbuild_cdn = "https://cdn.tactilityproject.org"
|
ttbuild_cdn = "https://cdn.tactilityproject.org"
|
||||||
ttbuild_sdk_json_validity = 3600 # seconds
|
ttbuild_sdk_json_validity = 3600 # seconds
|
||||||
ttport = 6666
|
ttport = 6666
|
||||||
@@ -30,7 +30,7 @@ shell_color_cyan = "\033[36m"
|
|||||||
shell_color_reset = "\033[m"
|
shell_color_reset = "\033[m"
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
print("Usage: python tactility.py [action] [options]")
|
print("Usage: python tactility.py [app_path] [action] [options]")
|
||||||
print("")
|
print("")
|
||||||
print("Actions:")
|
print("Actions:")
|
||||||
print(" build [platform] Build the app. Optionally specify a platform.")
|
print(" build [platform] Build the app. Optionally specify a platform.")
|
||||||
@@ -50,6 +50,10 @@ def print_help():
|
|||||||
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH with platform subfolders matching target platforms.")
|
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH with platform subfolders matching target platforms.")
|
||||||
print(" --skip-build Run everything except the idf.py/CMake commands")
|
print(" --skip-build Run everything except the idf.py/CMake commands")
|
||||||
print(" --verbose Show extra console output")
|
print(" --verbose Show extra console output")
|
||||||
|
print("")
|
||||||
|
print("Examples:")
|
||||||
|
print(" python tactility.py Apps/Snake build esp32s3 --verbose")
|
||||||
|
print(" python tactility.py Apps/Snake bir 192.168.1.50 esp32s3")
|
||||||
|
|
||||||
# region Core
|
# region Core
|
||||||
|
|
||||||
@@ -644,6 +648,20 @@ if __name__ == "__main__":
|
|||||||
if "--local-sdk" in sys.argv:
|
if "--local-sdk" in sys.argv:
|
||||||
use_local_sdk = True
|
use_local_sdk = True
|
||||||
sys.argv.remove("--local-sdk")
|
sys.argv.remove("--local-sdk")
|
||||||
|
|
||||||
|
# Check if the first argument is a path to an app directory
|
||||||
|
if len(sys.argv) > 2:
|
||||||
|
potential_app_dir = sys.argv[1]
|
||||||
|
if os.path.isdir(potential_app_dir) and os.path.isfile(os.path.join(potential_app_dir, "manifest.properties")):
|
||||||
|
if verbose:
|
||||||
|
print_status_success(f"Switching to app directory: {potential_app_dir}")
|
||||||
|
os.chdir(potential_app_dir)
|
||||||
|
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print_help()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
action_arg = sys.argv[1]
|
action_arg = sys.argv[1]
|
||||||
|
|
||||||
# Environment setup
|
# Environment setup
|
||||||
|
|||||||
Reference in New Issue
Block a user