From 406da2675fda8547a22febff76c18d045f626ed1 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Fri, 26 Jul 2024 08:44:38 -0400 Subject: [PATCH 1/2] build: lint bash files --- .github/dependabot.yml | 8 ++++++++ .github/workflows/linting.yml | 16 ++++++++++++++++ build.sh | 13 +++++++------ 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/linting.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b912060 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + time: "08:00" + timezone: "America/New_York" diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..c9fe9b0 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,16 @@ +name: tizen-build-action lint +on: + push: + pull_request: + +jobs: + bash-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Lint Bash + uses: azohra/shell-linter@latest + with: + path: '*.sh' diff --git a/build.sh b/build.sh index d5fa669..bdcd65b 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,7 @@ INSTALLER="$GITHUB_WORKSPACE/tizen-studio_5.1.bin" wget -nc -O "$INSTALLER" http://download.tizen.org/sdk/Installer/tizen-studio_5.1/web-cli_Tizen_Studio_5.1_ubuntu-64.bin chmod a+x "$INSTALLER" -"$INSTALLER" --accept-license $TIZEN_STUDIO +"$INSTALLER" --accept-license "$TIZEN_STUDIO" PATH="$TIZEN_STUDIO/tools/ide/bin:$PATH" @@ -21,7 +21,7 @@ fi PROJECT_DIR="$1" -if [ ! -z $2 ]; then +if [ -n "$2" ]; then CUSTOM_AUTHOR_CERT="$GITHUB_WORKSPACE/author-cert.cer" echo -n "$2" | base64 -d >"$CUSTOM_AUTHOR_CERT" fi @@ -33,14 +33,14 @@ echo -n "$3" | base64 -d >"$AUTHOR_KEY" AUTHOR_PASSWORD="$4" -if [ ! -z $5 ]; then +if [ -n "$5" ]; then CUSTOM_DISTRIBUTOR_CERT="$GITHUB_WORKSPACE/distributor-cert.cer" echo -n "$5" | base64 -d >"$CUSTOM_DISTRIBUTOR_CERT" fi DEFAULT_DISTRIBUTOR_CERT="$TIZEN_STUDIO/tools/certificate-generator/certificates/distributor/sdk-$PRIVILEGE/tizen-distributor-ca.cer" DISTRIBUTOR_CERT="${CUSTOM_DISTRIBUTOR_CERT:-"$DEFAULT_DISTRIBUTOR_CERT"}" -if [ ! -z $6 ]; then +if [ -n "$6" ]; then CUSTOM_DISTRIBUTOR_KEY="$GITHUB_WORKSPACE/distributor-key.p12" echo -n "$6" | base64 -d >"$CUSTOM_DISTRIBUTOR_KEY" fi @@ -49,7 +49,7 @@ DISTRIBUTOR_KEY="${CUSTOM_DISTRIBUTOR_KEY:-"$DEFAULT_DISTRIBUTOR_KEY"}" DISTRIBUTOR_PASSWORD="${7:-tizenpkcs12passfordsigner}" -echo <> $GITHUB_OUTPUT + echo "package-artifact=$PACKAGE_OUTPUT_PATH" >> "$GITHUB_OUTPUT" else SUCCESS=false cat "$ERROR_LOG" From c7e50fe6b432113070887b005cc4f67678c2018a Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Fri, 26 Jul 2024 08:45:54 -0400 Subject: [PATCH 2/2] chore: add shebang --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index bdcd65b..f2196ae 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Set up Tizen Studio #