From 9962401d744fe6c64d9d0ffe3404a431dfcd4c4e Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 17 Oct 2022 08:35:36 +0200 Subject: [PATCH] Fix some issues in scripts - Always use bash for consistent script behavior - Replace deprecated set-output in GitHub workflows --- .github/workflows/release.yml | 4 ++-- scripts/after-release.sh | 2 +- scripts/ci/recognize-match-hostname.sh | 2 +- scripts/ci/release-notes.sh | 2 +- scripts/commit-beta.sh | 2 +- scripts/local/build-app.sh | 2 +- scripts/local/review-app.sh | 2 +- scripts/local/submit-app.sh | 2 +- scripts/local/test-app.sh | 2 +- scripts/util/add-provider-description.sh | 2 +- scripts/util/downscale-ios-icon.sh | 2 +- scripts/util/export-for-translations.sh | 2 +- scripts/util/import-onesky-metadata.sh | 2 +- scripts/util/import-onesky-translations.sh | 2 +- scripts/util/list-untranslated.sh | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de8c11b5..278b8d1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,8 +55,8 @@ jobs: run: | VERSION=`ci/version-number.sh $PLATFORM` BUILD=`ci/build-number.sh $PLATFORM` - echo "::set-output name=version::$VERSION" - echo "::set-output name=build::$BUILD" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "build=$BUILD" >> $GITHUB_OUTPUT - name: Create keychain uses: ./.github/actions/create-keychain with: diff --git a/scripts/after-release.sh b/scripts/after-release.sh index ed625d6b..e95bcb9a 100755 --- a/scripts/after-release.sh +++ b/scripts/after-release.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash VERSION=$1 if [[ -z $VERSION ]]; then diff --git a/scripts/ci/recognize-match-hostname.sh b/scripts/ci/recognize-match-hostname.sh index 7ba767f7..aa61ed33 100755 --- a/scripts/ci/recognize-match-hostname.sh +++ b/scripts/ci/recognize-match-hostname.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash HOSTNAME=`echo $MATCH_GIT_URL | sed -E "s/^.*@(.*):.*$/\1/"` grep -q $HOSTNAME ~/.ssh/known_hosts if [[ $? != 0 ]]; then diff --git a/scripts/ci/release-notes.sh b/scripts/ci/release-notes.sh index 7508c0f1..9ed4830b 100755 --- a/scripts/ci/release-notes.sh +++ b/scripts/ci/release-notes.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash VERSION=$1 if [[ -z $VERSION ]]; then echo "Must provide version" diff --git a/scripts/commit-beta.sh b/scripts/commit-beta.sh index 3991a0d3..69ed8176 100755 --- a/scripts/commit-beta.sh +++ b/scripts/commit-beta.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CURRENT_BRANCH=`git branch --show-current` if [[ $CURRENT_BRANCH != "master" ]]; then echo "Not on master branch" diff --git a/scripts/local/build-app.sh b/scripts/local/build-app.sh index cee1069c..f3509a80 100755 --- a/scripts/local/build-app.sh +++ b/scripts/local/build-app.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash PLATFORM=$1 if [[ -z $PLATFORM ]]; then echo "Platform required" diff --git a/scripts/local/review-app.sh b/scripts/local/review-app.sh index e7b2e399..866298f4 100755 --- a/scripts/local/review-app.sh +++ b/scripts/local/review-app.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash PLATFORM=$1 if [[ -z $PLATFORM ]]; then echo "Platform required" diff --git a/scripts/local/submit-app.sh b/scripts/local/submit-app.sh index 39c86184..f4d66000 100755 --- a/scripts/local/submit-app.sh +++ b/scripts/local/submit-app.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash PLATFORM=$1 if [[ -z $PLATFORM ]]; then echo "Platform required" diff --git a/scripts/local/test-app.sh b/scripts/local/test-app.sh index 3b02331b..829e766c 100755 --- a/scripts/local/test-app.sh +++ b/scripts/local/test-app.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash PLATFORM=$1 if [[ -z $PLATFORM ]]; then echo "Platform required" diff --git a/scripts/util/add-provider-description.sh b/scripts/util/add-provider-description.sh index a42fc3a4..3e51dac4 100755 --- a/scripts/util/add-provider-description.sh +++ b/scripts/util/add-provider-description.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash PATTERN="Passepartout/App/fastlane/ios/metadata/*/description.txt" AFTER=$1 NAME=$2 diff --git a/scripts/util/downscale-ios-icon.sh b/scripts/util/downscale-ios-icon.sh index d013e9b0..eaf0c600 100755 --- a/scripts/util/downscale-ios-icon.sh +++ b/scripts/util/downscale-ios-icon.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SIZES="120 152 167 180 76" cd Passepartout/App/Assets.xcassets/AppIcon.appiconset diff --git a/scripts/util/export-for-translations.sh b/scripts/util/export-for-translations.sh index 2e6e6331..3b9381b9 100755 --- a/scripts/util/export-for-translations.sh +++ b/scripts/util/export-for-translations.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash APP_ROOT="Passepartout/App" APP_SHARED_ROOT="Passepartout/AppShared" diff --git a/scripts/util/import-onesky-metadata.sh b/scripts/util/import-onesky-metadata.sh index b97f23b0..5d612437 100755 --- a/scripts/util/import-onesky-metadata.sh +++ b/scripts/util/import-onesky-metadata.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash FILE="$1" SRC="$2/$FILE" DST="$3" diff --git a/scripts/util/import-onesky-translations.sh b/scripts/util/import-onesky-translations.sh index 05dd97dd..635bee6a 100755 --- a/scripts/util/import-onesky-translations.sh +++ b/scripts/util/import-onesky-translations.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SRC="$1" DST="$2" for LANG in "de" "el" "en" "es" "fr" "it" "nl" "pl" "pt" "ru" "sv" "zh-Hans"; do diff --git a/scripts/util/list-untranslated.sh b/scripts/util/list-untranslated.sh index 08038e2f..b845851a 100755 --- a/scripts/util/list-untranslated.sh +++ b/scripts/util/list-untranslated.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash DIR="Passepartout/AppShared" FILENAME="Localizable.strings"