From 6ac80c8b907792470694d103132558a624c51375 Mon Sep 17 00:00:00 2001 From: Dominic Sudy Date: Thu, 5 Jan 2023 11:49:32 +0100 Subject: [PATCH] Verify cross compile architecture --- .scripts/common.sh | 2 +- NOTICE-3RD-PARTY-CONTENT.md | 2 +- build.sh | 10 ++++++++-- install_dependencies.sh | 2 +- requirements.txt | 2 +- sdk/Dockerfile | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.scripts/common.sh b/.scripts/common.sh index 406ee7d0..fbe28ef4 100644 --- a/.scripts/common.sh +++ b/.scripts/common.sh @@ -13,7 +13,7 @@ # # SPDX-License-Identifier: Apache-2.0 -function get_valid_cross_compile_architecute() { +function get_valid_cross_compile_architecture() { if [[ "$1" == "aarch64" || "$1" == "arm64" ]]; then HOST_ARCH="aarch64" elif [[ "$1" == "x86_64" || "$1" == "amd64" ]]; then diff --git a/NOTICE-3RD-PARTY-CONTENT.md b/NOTICE-3RD-PARTY-CONTENT.md index 6e5aead3..4193a2d2 100644 --- a/NOTICE-3RD-PARTY-CONTENT.md +++ b/NOTICE-3RD-PARTY-CONTENT.md @@ -28,7 +28,7 @@ |pre-commit|3.5.0|MIT| |pygments|2.17.2|Simplified BSD| |PyJWT|2.8.0|MIT| -|python-dateutil|2.9.0|Apache 2.0
BSD| +|python-dateutil|2.9.0.post0|Apache 2.0
BSD| |PyYAML|6.0.1|MIT| |requests|2.31.0|Apache 2.0| |setuptools|58.1.0|MIT| diff --git a/build.sh b/build.sh index 6aef7d24..70c03761 100755 --- a/build.sh +++ b/build.sh @@ -17,7 +17,7 @@ # Builds the targets of the project in different flavors. # -set -e +source ./.scripts/common.sh function print_help() { echo "Build targets of the project @@ -74,7 +74,13 @@ while [[ $# -gt 0 ]]; do shift ;; -x|--cross) - HOST_ARCH="$2" + HOST_ARCH=$( get_valid_cross_compile_architecture "$2" ) + + if [ "$?" -eq 1 ]; then + echo "Invalid cross-compile architecture '$2'!" + exit 1 + fi + shift shift ;; diff --git a/install_dependencies.sh b/install_dependencies.sh index a42b5d9a..8f355072 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -58,7 +58,7 @@ while [[ $# -gt 0 ]]; do shift ;; -x|--cross) - HOST_ARCH=$( get_valid_cross_compile_architecute "$2" ) + HOST_ARCH=$( get_valid_cross_compile_architecture "$2" ) if [ "$?" -eq 1 ]; then echo "Invalid cross-compile architecture '$2'!" diff --git a/requirements.txt b/requirements.txt index 35376fb7..ad95f332 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ gcovr==5.2 -conan==1.60.2 +conan==1.63.0 pre-commit==3.5.0 cpplint==1.6.1 diff --git a/sdk/Dockerfile b/sdk/Dockerfile index 5b26e138..3bd04f83 100644 --- a/sdk/Dockerfile +++ b/sdk/Dockerfile @@ -29,7 +29,7 @@ RUN apk update && \ apk add git && \ apk add nodejs && \ apk add npm && \ - pip3 install "conan==1.60.2" + pip3 install "conan==1.63.0" COPY . /sdk