Skip to content

Commit d171d34

Browse files
Paolo Calaopolldo
authored andcommitted
Download provisioning binaries from aws (#74)
This completes the task of decoupling provisioning binaries from the repo. - Now users can use the 'device create' commands from any directory, since binaries are no more tied to a certain folder - Binaries can be updated without requiring a new release of the cli Changes: - provisioning binaries are now downloaded instead of being searched in the binaries folder - binaries folder has been removed - binaries are removed from the release process
1 parent 4629534 commit d171d34

24 files changed

+475
-184
lines changed

.github/workflows/release-go-task.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ env:
99
# The project's folder on Arduino's download server for uploading builds
1010
AWS_PLUGIN_TARGET: TODO
1111
ARTIFACT_NAME: dist
12-
# TODO: Remember to REMOVE binaries folder as soon as it is removed from the project
13-
PROVISIONING_BINARIES_FOLDER: binaries
1412

1513
on:
1614
push:
@@ -104,15 +102,14 @@ jobs:
104102
# This step performs the following:
105103
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
106104
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
107-
# TODO: Remember to REMOVE binaries folder as soon as it is removed from the project ({{.PROVISIONING_BINARIES_FOLDER}})
108105
run: |
109106
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
110107
# so we need to add execution permission back until the action is made to do this.
111108
chmod +x ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_amd64/${{ env.PROJECT_NAME }}
112109
TAG="${GITHUB_REF/refs\/tags\//}"
113110
tar -czvf "${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz" \
114111
-C ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_amd64/ ${{ env.PROJECT_NAME }} \
115-
-C ../../ ${{ env.PROVISIONING_BINARIES_FOLDER }} LICENSE.txt
112+
-C ../../ LICENSE.txt
116113
CHECKSUM="$(shasum -a 256 ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz | cut -d " " -f 1)"
117114
perl \
118115
-pi \

DistTasks.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ tasks:
3939
Windows_32bit:
4040
desc: Builds Windows 32 bit binaries
4141
dir: "{{.DIST_DIR}}"
42-
# TODO: Remember to REMOVE binaries folder as soon as it is removed from the project
4342
cmds:
4443
- |
4544
docker run -v `pwd`/..:/home/build -w /home/build \
@@ -50,7 +49,7 @@ tasks:
5049
5150
cp {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe ../
5251
cd ..
53-
zip -r {{.DIST_DIR}}/{{.PACKAGE_NAME}} {{.PROJECT_NAME}}.exe {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt
52+
zip -r {{.DIST_DIR}}/{{.PACKAGE_NAME}} {{.PROJECT_NAME}}.exe LICENSE.txt
5453
cd {{.DIST_DIR}}
5554
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
5655
@@ -75,7 +74,7 @@ tasks:
7574
7675
cp {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe ../
7776
cd ..
78-
zip -r {{.DIST_DIR}}/{{.PACKAGE_NAME}} {{.PROJECT_NAME}}.exe {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt
77+
zip -r {{.DIST_DIR}}/{{.PACKAGE_NAME}} {{.PROJECT_NAME}}.exe LICENSE.txt
7978
cd {{.DIST_DIR}}
8079
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
8180
@@ -98,7 +97,7 @@ tasks:
9897
--build-cmd "{{.BUILD_COMMAND}}" \
9998
-p "{{.BUILD_PLATFORM}}"
10099
101-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
100+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
102101
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
103102
104103
vars:
@@ -120,7 +119,7 @@ tasks:
120119
--build-cmd "{{.BUILD_COMMAND}}" \
121120
-p "{{.BUILD_PLATFORM}}"
122121
123-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
122+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
124123
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
125124
126125
vars:
@@ -142,7 +141,7 @@ tasks:
142141
--build-cmd "{{.BUILD_COMMAND}}" \
143142
-p "{{.BUILD_PLATFORM}}"
144143
145-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
144+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
146145
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
147146
148147
vars:
@@ -164,7 +163,7 @@ tasks:
164163
--build-cmd "{{.BUILD_COMMAND}}" \
165164
-p "{{.BUILD_PLATFORM}}"
166165
167-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
166+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
168167
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
169168
170169
vars:
@@ -214,7 +213,7 @@ tasks:
214213
--build-cmd "{{.BUILD_COMMAND}}" \
215214
-p "{{.BUILD_PLATFORM}}"
216215
217-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
216+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
218217
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
219218
220219
vars:
@@ -236,7 +235,7 @@ tasks:
236235
--build-cmd "{{.BUILD_COMMAND}}" \
237236
-p "{{.BUILD_PLATFORM}}"
238237
239-
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. {{.PROVISIONING_BINARIES_FOLDER}} LICENSE.txt -f {{.PACKAGE_NAME}}
238+
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
240239
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
241240
242241
vars:

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ This code is licensed under the terms of the GNU Affero General Public License v
77

88
### Requirements
99

10-
This is all you need to use arduino-cloud-cli for device **provisioning**:
10+
This is all you need to use arduino-cloud-cli:
1111
* A client ID and a secret ID, retrievable from the [cloud](https://create.arduino.cc/iot/integrations) by creating a new API key
12-
* The folder containing the precompiled provisioning firmwares (`binaries`) needs to be in the same location you run the command from
1312

1413
### Additional info
1514

-3.91 MB
Binary file not shown.
-533 KB
Binary file not shown.

binaries/arduino.samd.mkr1000.bin

-111 KB
Binary file not shown.

binaries/arduino.samd.mkrgsm1400.bin

-143 KB
Binary file not shown.

binaries/arduino.samd.mkrnb1500.bin

-111 KB
Binary file not shown.

binaries/arduino.samd.mkrwifi1010.bin

-80.1 KB
Binary file not shown.

binaries/arduino.samd.nano_33_iot.bin

-79.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)