@@ -115,17 +115,17 @@ tasks:
115115 desc : " Clones the examples repo directly into the debian structure"
116116 cmds :
117117 - |
118- set -e
119- echo "Runner version set as: {{ .EXAMPLE_VERSION }}"
120- TMP_PATH="$(mktemp -d)"
121- DEST_PATH="debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/"
122- echo "Cloning arduino/app-bricks-examples into temporary directory ${TMP_PATH}..."
123- git clone --depth 1 --branch "{{ .EXAMPLE_VERSION }}" https://github.com/arduino/app-bricks-examples "${TMP_PATH}"
124- rm -rf "${DEST_PATH}/examples"
125- mkdir -p "${DEST_PATH}"
126- mv "${TMP_PATH}/examples" "${DEST_PATH}"
127- rm -rf "${TMP_PATH}/examples"
128- echo "Examples successfully cloned."
118+ set -e
119+ echo "Runner version set as: {{ .EXAMPLE_VERSION }}"
120+ TMP_PATH="$(mktemp -d)"
121+ DEST_PATH="debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/"
122+ echo "Cloning arduino/app-bricks-examples into temporary directory ${TMP_PATH}..."
123+ git clone --depth 1 --branch "{{ .EXAMPLE_VERSION }}" https://github.com/arduino/app-bricks-examples "${TMP_PATH}"
124+ rm -rf "${DEST_PATH}/examples"
125+ mkdir -p "${DEST_PATH}"
126+ mv "${TMP_PATH}/examples" "${DEST_PATH}"
127+ rm -rf "${TMP_PATH}/examples"
128+ echo "Examples successfully cloned."
129129 silent : false
130130
131131 build :
@@ -143,10 +143,10 @@ tasks:
143143 desc : Create a tag on the current commit and push it to the remote to create the release
144144 cmds :
145145 - |
146- if [ -z "{{.CLI_ARGS}}" ]; then
147- echo "Error: Version argument is required. Usage: task orchestrator:trigger:release -- <version>"
148- exit 1
149- fi
146+ if [ -z "{{.CLI_ARGS}}" ]; then
147+ echo "Error: Version argument is required. Usage: task orchestrator:trigger:release -- <version>"
148+ exit 1
149+ fi
150150 - git tag -a "{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}"
151151 - git push origin "{{.CLI_ARGS}}"
152152
@@ -186,25 +186,25 @@ tasks:
186186 desc : Download and locally install the official examples
187187 cmds :
188188 - |
189- set -e
190- DEST_PATH=$(case "$(uname)" in
191- Darwin) echo "$HOME/Library/Application Support/arduino-app-cli/" ;;
192- Linux) echo "$HOME/.config/arduino-app-cli/" ;;
193- *) echo "$AppData/arduino-app-cli/" ;;
194- esac)
195- TMP_PATH="$(mktemp -d)"
189+ set -e
190+ DEST_PATH=$(case "$(uname)" in
191+ Darwin) echo "$HOME/Library/Application Support/arduino-app-cli/" ;;
192+ Linux) echo "$HOME/.config/arduino-app-cli/" ;;
193+ *) echo "$AppData/arduino-app-cli/" ;;
194+ esac)
195+ TMP_PATH="$(mktemp -d)"
196196
197- echo "Cloning examples into temporary directory ${TMP_PATH}..."
198- git clone --depth 1 https://github.com/arduino/app-bricks-examples.git "${TMP_PATH}"
197+ echo "Cloning examples into temporary directory ${TMP_PATH}..."
198+ git clone --depth 1 https://github.com/arduino/app-bricks-examples.git "${TMP_PATH}"
199199
200- echo "Installing examples to ${DEST_PATH}examples"
201- rm -rf "${DEST_PATH}examples"
202- mkdir -p "${DEST_PATH}"
200+ echo "Installing examples to ${DEST_PATH}examples"
201+ rm -rf "${DEST_PATH}examples"
202+ mkdir -p "${DEST_PATH}"
203203
204- mv "${TMP_PATH}/examples" "${DEST_PATH}"
204+ mv "${TMP_PATH}/examples" "${DEST_PATH}"
205205
206- rm -rf "${TMP_PATH}"
207- echo "Examples installed successfully."
206+ rm -rf "${TMP_PATH}"
207+ echo "Examples installed successfully."
208208
209209 generate:assets :
210210 desc : This generates the models and bricks index. Also updates the corresponding testdata.
@@ -220,15 +220,15 @@ tasks:
220220 msg : " Both assets folder are already at version '{{.RUNNER_VERSION}}'. Nothing to do."
221221 cmds :
222222 - |
223- # Get the corresponding models and bricks release, and unzip it.
224- gh release download -R arduino/app-bricks-py "release/{{.SEMVER_TAG}}" -p '*.whl' -D "{{.TMPDIR}}" --clobber
225- unzip -o "{{.TMPDIR}}/arduino_app_bricks-{{.SEMVER_TAG}}-py3-none-any.whl" -d "{{.OUTPUT_DIR}}"
223+ # Get the corresponding models and bricks release, and unzip it.
224+ gh release download -R arduino/app-bricks-py "release/{{.SEMVER_TAG}}" -p '*.whl' -D "{{.TMPDIR}}" --clobber
225+ unzip -o "{{.TMPDIR}}/arduino_app_bricks-{{.SEMVER_TAG}}-py3-none-any.whl" -d "{{.OUTPUT_DIR}}"
226226 - |
227- # Copy the assets to the assets dir and testdata dir, replacing the previous version.
228- rm -rf "{{.ASSETS_DIR}}" && mkdir -p "{{.ASSETS_DIR}}"
229- cp -r "{{.OUTPUT_DIR}}/arduino/app_bricks/static" "{{.ASSETS_DIR}}/{{.SEMVER_TAG}}"
230- rm -rf "{{.TESTDATA_DIR}}" && mkdir -p "{{.TESTDATA_DIR}}"
231- cp -r "{{.OUTPUT_DIR}}/arduino/app_bricks/static" "{{.TESTDATA_DIR}}/{{.SEMVER_TAG}}"
227+ # Copy the assets to the assets dir and testdata dir, replacing the previous version.
228+ rm -rf "{{.ASSETS_DIR}}" && mkdir -p "{{.ASSETS_DIR}}"
229+ cp -r "{{.OUTPUT_DIR}}/arduino/app_bricks/static" "{{.ASSETS_DIR}}/{{.SEMVER_TAG}}"
230+ rm -rf "{{.TESTDATA_DIR}}" && mkdir -p "{{.TESTDATA_DIR}}"
231+ cp -r "{{.OUTPUT_DIR}}/arduino/app_bricks/static" "{{.TESTDATA_DIR}}/{{.SEMVER_TAG}}"
232232 - cmd : rm -rf {{.TMPDIR}}
233233 - cmd : echo "Updating the runnerVersion in config.go to '{{.RUNNER_VERSION}}'"
234234 - cmd : sed -i "{{.sed_replacement}}" internal/orchestrator/config/config.go
@@ -243,19 +243,19 @@ tasks:
243243 - task : general:prepare-deps
244244 cmds :
245245 - |
246- if
247- ! which licensed \
248- &>/dev/null
249- then
250- if [[ {{OS}} == "windows" ]]; then
251- echo "Licensed does not have Windows support."
252- echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact."
253- else
254- echo "licensed not found or not in PATH."
255- echo "Please install: https://github.com/licensee/licensed#installation"
246+ if
247+ ! which licensed \
248+ &>/dev/null
249+ then
250+ if [[ {{OS}} == "windows" ]]; then
251+ echo "Licensed does not have Windows support."
252+ echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact."
253+ else
254+ echo "licensed not found or not in PATH."
255+ echo "Please install: https://github.com/licensee/licensed#installation"
256+ fi
257+ exit 1
256258 fi
257- exit 1
258- fi
259259 - licensed cache
260260 - licensed notices
261261
0 commit comments