Skip to content

Commit

Permalink
Fix commit installs with new device_type param
Browse files Browse the repository at this point in the history
  • Loading branch information
mechawrench committed May 6, 2023
1 parent 107bba5 commit ba55463
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,6 @@ def choose_release(releases):

all_releases = get_all_releases()

if selected_option == 1:
latest_release, latest_pre_release = valid_releases
selected_release = latest_release
elif selected_option == 2:
selected_release = choose_release(all_releases)
elif selected_option == 3:
commit_hash = input("Enter the commit hash: ")
selected_release_version = commit_hash
selected_release_name = f"wificom-lib_{commit_hash}"
download_url = get_download_url_from_commit_hash(commit_hash)
tested_circuitpython_version = None
else:
print("Invalid option selected.")
sys.exit()

def prompt_for_device_type():
print("Select your device type:")
print("1. Arduino Nano RP2040 Connect (NINA)")
Expand All @@ -215,6 +200,21 @@ def prompt_for_device_type():

device_type = prompt_for_device_type()

if selected_option == 1:
latest_release, latest_pre_release = valid_releases
selected_release = latest_release
elif selected_option == 2:
selected_release = choose_release(all_releases)
elif selected_option == 3:
commit_hash = input("Enter the commit hash: ")
selected_release_version = commit_hash
selected_release_name = f"wificom-lib_{commit_hash}"
download_url = get_download_url_from_commit_hash(commit_hash, device_type)
tested_circuitpython_version = None
else:
print("Invalid option selected.")
sys.exit()

if selected_option != 3:
selected_release_name = selected_release['name'].replace('/', '_')
selected_release_version = selected_release['tag_name']
Expand Down

0 comments on commit ba55463

Please sign in to comment.