Skip to content

Commit 02860e6

Browse files
committed
Tagging improvements
1 parent aeef30c commit 02860e6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

example/tools/ota/ota_mass_upload.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,20 @@ echo ""
138138
echo "Status report:"
139139
arduino-cloud-cli ota status --ota-ids $otaids
140140

141+
exitcode=0
141142
if [ $correctlyfinished -eq 0 ]; then
142143
echo "OTA process did not complete within the specified time for some boards"
143-
exit 1
144+
exitcode=1
144145
else
145146
echo "OTA process completed successfully for all boards"
146-
if [ "$newtagversion" != "" ]; then
147-
echo "Tagging updated devices with tag: $newtagversion"
148-
arduino-cloud-cli device create-tags --ids $otasucceeded --tags $newtagversion
149-
fi
150-
exit 0
151147
fi
152148

153-
exit 0
149+
if [ "$newtagversion" != "" ]; then
150+
echo ""
151+
echo "Tag updated devices as \"$newtagversion\""
152+
arduino-cloud-cli device create-tags --ids $otasucceeded --tags $newtagversion
153+
echo ""
154+
arduino-cloud-cli device list --tags $newtagversion
155+
fi
156+
157+
exit $exitcode

0 commit comments

Comments
 (0)