From 9deaf649978e697e9f23a4ef0165f1c79dc7133d Mon Sep 17 00:00:00 2001 From: Kyriakos Sidiropoulos Date: Wed, 13 Mar 2024 19:00:44 +0100 Subject: [PATCH] fix (github-actions.yml): in github macos17 gradle@7 is installed under /usr/local/opt/gradle@7/bin --- .github/workflows/github-actions.yml | 7 ++++++- Laerdal.SetupBuildEnvironment.sh | 13 +++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index b89c6879..5645c254 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -22,6 +22,11 @@ jobs: runs-on: macos-14 +# variable substitution is not supported in github at all so we cant do stuff like this +# +# env: +# Build_Artifacts_Folderpath: $Build_Repository_Folderpath/Artifacts + steps: - uses: actions/checkout@v3 @@ -56,7 +61,7 @@ jobs: -p:ShouldSkipMacCatalyst="true" \ \ -p:PackageOutputPath="$Build_Repository_Folderpath/Artifacts" \ - -p:Laerdal_Gradle_Path="/usr/local/opt/gradle@7/bin/gradle" \ + -p:Laerdal_Gradle_Path="/opt/homebrew/opt/gradle@7/bin" \ -p:Laerdal_Source_Branch="$Source_Branch_Fullpath" \ -p:Laerdal_Repository_Path="$Github_Repository_Path" \ -p:Laerdal_Github_Access_Token="$Components_Team_Github_Access_Token" \ diff --git a/Laerdal.SetupBuildEnvironment.sh b/Laerdal.SetupBuildEnvironment.sh index 45877f08..77112a68 100644 --- a/Laerdal.SetupBuildEnvironment.sh +++ b/Laerdal.SetupBuildEnvironment.sh @@ -36,10 +36,10 @@ brew reinstall gradle@7 # exit 20 #fi -# shellcheck disable=SC2016 -echo 'export PATH="/usr/local/opt/gradle@7/bin:$PATH"' >> /Users/runner/.zprofile -# shellcheck disable=SC2016 -echo 'export PATH="/usr/local/opt/gradle@7/bin:$PATH"' >> /Users/runner/.bash_profile +# in github ci gradle@7 is installed under /opt/homebrew/opt/gradle@7/bin +# but in azure devops it is installed under /usr/local/opt/gradle@7/bin +echo 'export PATH="/usr/local/opt/gradle@7/bin:/opt/homebrew/opt/gradle@7/bin:$PATH"' >> /Users/runner/.zprofile +echo 'export PATH="/usr/local/opt/gradle@7/bin:/opt/homebrew/opt/gradle@7/bin:$PATH"' >> /Users/runner/.bash_profile source /Users/runner/.bash_profile brew install openjdk@17 @@ -156,14 +156,15 @@ if [ $exitCode != 0 ]; then fi echo -echo "** Gradle Version:" -gradle --version +echo "** Gradle Location and Version:" +which gradle && gradle --version declare exitCode=$? if [ $exitCode != 0 ]; then echo "##vso[task.logissue type=error]Failed to find 'gradle'." exit 120 fi + echo echo "** Sharpie Version:" sharpie --version