File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
.github/actions/configure-gradle Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ runs:
1919 echo Setting distribution URL to: https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
2020
2121 # Detect OS and set appropriate sed option
22- if [[ "$OSTYPE" == "darwin"* ]] ; then
23- SED_OPTS=(-i '') # macOS (BSD sed) requires an empty string after -i
22+ if sed --version 2>/dev/null | grep -q "GNU sed" ; then
23+ SED_CMD="sed -i" # GNU sed (Linux)
2424 else
25- SED_OPTS=(-i) # Linux (GNU sed) does not need an empty string
25+ SED_CMD="sed -i ''" # BSD sed (macOS)
2626 fi
2727
28- sed -i "${SED_OPTS[@]}" "/distributionUrl/c\\
28+ # Replace the line containing "distributionUrl" with the new distributionUrl
29+ $SED_CMD "/distributionUrl/c\\
2930 distributionUrl=https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip\\
3031 " ./gradle/wrapper/gradle-wrapper.properties
You can’t perform that action at this time.
0 commit comments