Skip to content

Commit

Permalink
fix (github-actions.yml): in github macos17 gradle@7 is installed und…
Browse files Browse the repository at this point in the history
…er /usr/local/opt/gradle@7/bin
  • Loading branch information
ksidirop-laerdal committed Mar 13, 2024
1 parent db29e0f commit 9deaf64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" \
Expand Down
13 changes: 7 additions & 6 deletions Laerdal.SetupBuildEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9deaf64

Please sign in to comment.