summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-02-28 14:57:32 -0500
committerDan Halbert <halbert@halwitz.org>2020-02-28 14:57:32 -0500
commit1b8a4791f504b44f9f38677f8d05a774826f7f05 (patch)
tree2883644264ddb4e934f54ef6b86d57d08fdce9ca
parent1b33cd11fc788bd6b45b54c5629a3b98a92efc2a (diff)
Download links now point to S3 via CloudFront
-rw-r--r--.github/workflows/build.yml7
-rw-r--r--tools/build_board_info.py15
2 files changed, 14 insertions, 8 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 118135850..d91e44358 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -276,10 +276,3 @@ jobs:
- name: Install upload deps
run: |
pip install uritemplate
- - name: Upload to Release
- run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
- working-directory: tools
- env:
- UPLOAD_URL: ${{ github.event.release.upload_url }}
- ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
- if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index 1f074dddf..5b1387690 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -21,6 +21,10 @@ HEX = ('hex',)
HEX_UF2 = ('hex', 'uf2')
SPK = ('spk',)
+# Example:
+# https://d111q2jukuzyg1.cloudfront.net/bin/trinket_m0/en_US/adafruit-circuitpython-trinket_m0-en_US-5.0.0-rc.0.uf2
+DOWNLOAD_BASE_URL = "https://d111q2jukuzyg1.cloudfront.net/bin"
+
# Default extensions
extension_by_port = {
"nrf": UF2,
@@ -34,6 +38,8 @@ extension_by_port = {
extension_by_board = {
# samd
"arduino_mkr1300": BIN,
+ "arduino_mkrzero": BIN,
+ "arduino_nano_33_iot": BIN,
"arduino_zero": BIN,
"feather_m0_adalogger": BIN_UF2,
"feather_m0_basic": BIN_UF2,
@@ -275,7 +281,14 @@ def generate_download_info():
files = []
new_version["files"][language] = files
for extension in board_info["extensions"]:
- files.append("https://github.com/adafruit/circuitpython/releases/download/{tag}/adafruit-circuitpython-{alias}-{language}-{tag}.{extension}".format(tag=new_tag, alias=alias, language=language, extension=extension))
+ files.append(
+ "{base_url}/{alias}/{language}/adafruit-circuitpython-{alias}-{language}-{tag}.{extension}"
+ .format(
+ base_url=DOWNLOAD_BASE_URL,
+ tag=new_tag,
+ alias=alias,
+ language=language,
+ extension=extension))
current_info[alias]["downloads"] = alias_info["download_count"]
current_info[alias]["versions"].append(new_version)