Skip to content

Commit c3adf66

Browse files
authored
Merge pull request #7775 from gojimmypi/pr-arduino-script
Update Arduino publishing script for 5.7.2 release
2 parents 9f62ff6 + a07a658 commit c3adf66

2 files changed

Lines changed: 25 additions & 11 deletions

File tree

IDE/ARDUINO/Arduino_README_prepend.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ See the [Arduino-wolfSSL logs](https://downloads.arduino.cc/libraries/logs/githu
1010

1111
The first Official wolfSSL Arduino Library is `5.6.6-Arduino.1`: a slightly modified, post [release 5.6.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.6-stable) version update.
1212

13+
The next Official wolfSSL Arduino Library is [5.7.0](https://github.com/wolfSSL/wolfssl/releases/tag/v5.7.0-stable)
14+
1315
See other [wolfSSL releases versions](https://github.com/wolfSSL/wolfssl/releases). The `./wolfssl-arduino.sh INSTALL` [script](https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO) can be used to install specific GitHub versions as needed.

IDE/ARDUINO/wolfssl-arduino.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ROOT_DIR="/wolfssl"
3030

3131
# The Arduino Version will initially have a suffix appended during fine tuning stage.
32-
WOLFSSL_VERSION_ARUINO_SUFFIX="-Arduino.3"
32+
WOLFSSL_VERSION_ARUINO_SUFFIX=""
3333

3434
# For verbose copy, set CP_CMD="-v", otherwise clear it: CP_CMD="cp"
3535
# Do not set to empty string, as copy will fail with this: CP_CMD=""
@@ -65,6 +65,11 @@ if ! [ "$CP_CMD" = "cp " ]; then
6565
fi
6666
fi
6767

68+
if [ "$ROOT_DIR" = "" ]; then
69+
echo "ERROR: ROOT_DIR cannot be blank"
70+
exit 1
71+
fi
72+
6873
# Check environment
6974
if [ -n "$WSL_DISTRO_NAME" ]; then
7075
# we found a non-blank WSL environment distro name
@@ -84,6 +89,11 @@ if [ $# -gt 0 ]; then
8489
if [ "$THIS_OPERATION" = "INSTALL" ]; then
8590
THIS_INSTALL_DIR=$2
8691

92+
if [ "$THIS_INSTALL_DIR" = "/" ]; then
93+
echo "ERROR: THIS_INSTALL_DIR cannot be /"
94+
exit 1
95+
fi
96+
8797
echo "Install is active."
8898

8999
if [ "$THIS_INSTALL_DIR" = "" ]; then
@@ -300,20 +310,22 @@ echo ""
300310
# Note we should have exited above if a problem was encountered,
301311
# as we'll never want to install a bad library.
302312
if [ "$THIS_OPERATION" = "INSTALL" ]; then
313+
echo "Config:"
314+
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
315+
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
316+
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
317+
318+
# Show the user_settings.h revision string:
319+
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
320+
echo ""
321+
303322
if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then
304323
echo "Installing to GitHub directory: $THIS_INSTALL_DIR"
305324
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
325+
echo "Removing workspace library directory: .$ROOT_DIR"
326+
rm -rf ".$ROOT_DIR"
306327
else
307-
echo "Config:"
308-
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
309-
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
310-
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
311-
312-
# Show the user_settings.h revision string:
313-
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
314-
echo ""
315-
316-
echo "Install:"
328+
echo "Installing to local directory:"
317329
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
318330
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
319331

0 commit comments

Comments
 (0)