Skip to content

Commit 9d07e5c

Browse files
committed
Rework mac logic to fallback to new semver used by osexperts
1 parent c21c9dd commit 9d07e5c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/actions/setup-ffmpeg/action.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
local binary_name="${2:-FFmpeg}"
2424
local output_file="$(echo "$binary_name" | tr '[:upper:]' '[:lower:]').zip"
2525
26-
if curl -sS -f -L --retry 3 --retry-delay 5 "$url" -o "$output_file"; then
26+
if curl -sS -f -L --retry 3 --retry-delay 8 --retry-all-errors "$url" -o "$output_file"; then
2727
echo "Downloaded $binary_name from $url"
2828
unzip -q "$output_file"
2929
rm -f "$output_file"
@@ -42,7 +42,13 @@ runs:
4242
chmod +x "$INSTALL_DIR/"*
4343
4444
elif [[ "${{ runner.os }}" == "macOS" ]]; then
45-
FF_VERSION=$(echo "$FF_VERSION" | awk -F. '{print $1 $2}')
45+
major=$(echo "$FF_VERSION" | cut -d. -f1)
46+
minor=$(echo "$FF_VERSION" | cut -d. -f2 | sed 's/^0*//')
47+
FF_VERSION="${major}${minor}"
48+
if [[ -z "$minor" ]]; then
49+
FF_VERSION="$major"
50+
fi
51+
4652
download_binary "https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip"
4753
mv ffmpeg "$INSTALL_DIR/ffmpeg"
4854
download_binary "https://www.osxexperts.net/ffprobe${FF_VERSION}arm.zip" "FFprobe"

0 commit comments

Comments
 (0)