Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/build-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ runs:
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.5
path: ./Apps/${{ inputs.app_name }}
path: .
# The export reset prevents an error when building other targets
# 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'
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 0 additions & 1 deletion Apps/Calculator/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/Diceware/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/GPIO/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/GraphicsDemo/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/HelloWorld/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/MystifyDemo/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/SerialConsole/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/Snake/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/TamaTac/tactility.py

This file was deleted.

1 change: 0 additions & 1 deletion Apps/TwoEleven/tactility.py

This file was deleted.

24 changes: 21 additions & 3 deletions tactility.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from urllib.parse import urlparse

ttbuild_path = ".tactility"
ttbuild_version = "3.4.0"
ttbuild_version = "3.5.0"
ttbuild_cdn = "https://cdn.tactilityproject.org"
ttbuild_sdk_json_validity = 3600 # seconds
ttport = 6666
Expand All @@ -30,10 +30,10 @@
shell_color_reset = "\033[m"

def print_help():
print("Usage: python tactility.py [action] [options]")
print("Usage: python tactility.py [app_path] [action] [options]")
print("")
print("Actions:")
print(" build [platform] Build the app. Optionally specify a platform.")
print(" build [platform] Build the app. Optionally specify a platform.")
print(" Supported platforms are lower case. Example: esp32s3")
print(" Supported platforms are read from manifest.properties")
print(" clean Clean the build folders")
Expand All @@ -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(" --skip-build Run everything except the idf.py/CMake commands")
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

Expand Down Expand Up @@ -644,6 +648,20 @@ def uninstall_action(manifest, ip):
if "--local-sdk" in sys.argv:
use_local_sdk = True
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]

# Environment setup
Expand Down