From ccf9058a2e98eb34edf928f1b68da68e0fe96b0c Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Sun, 6 Oct 2024 16:00:42 +0200 Subject: [PATCH] Install all components by default Signed-off-by: Jonathan Schwender --- .github/workflows/workflow.yml | 5 ++++- CHANGELOG.md | 5 +++++ action.yml | 2 +- install_ohos_sdk.sh | 7 ++++++- 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 97eb5b2..5f4d8c9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -44,7 +44,10 @@ jobs: SDK_PATH: "${{ steps.sdk-with-components.outputs.sdk-path }}" run: | ${OHOS_SDK_NATIVE}/llvm/bin/clang --version - ${SDK_PATH}/*/toolchains/hdc --version + if [[ test -d "${SDK_PATH}"/*/previewer ]]; then + echo "Unselected component should not be present" + exit 1 + fi - name: Remove previous SDK installation env: SDK_PATH: "${{ steps.sdk-with-components.outputs.sdk-path }}" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e0715fe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# v0.2 (unreleased) + +- Now supports OH 5.0 +- The `components` input now defaults to `all`, since `hvigor` 5 will throw an error if not all + components are installed. diff --git a/action.yml b/action.yml index e1b2cc5..82d4a3a 100644 --- a/action.yml +++ b/action.yml @@ -12,7 +12,7 @@ inputs: components: description: "Semicolon separated list of SDK components that should be made available" required: false - default: 'native' + default: 'all' fixup-path: description: "Whether to fixup the output paths so that the components appear under api level directory" required: false diff --git a/install_ohos_sdk.sh b/install_ohos_sdk.sh index 248cc07..c6d3433 100755 --- a/install_ohos_sdk.sh +++ b/install_ohos_sdk.sh @@ -90,7 +90,12 @@ fi OHOS_BASE_SDK_HOME="$PWD" -IFS=";" read -ra COMPONENTS <<< "${INPUT_COMPONENTS}" +if [[ "${INPUT_COMPONENTS}" == "all" ]]; then + COMPONENTS=(*.zip) +else + IFS=";" read -ra COMPONENTS <<< "${INPUT_COMPONENTS}" +fi + for COMPONENT in "${COMPONENTS[@]}" do echo "Extracting component ${COMPONENT}"