Skip to content

Commit

Permalink
Update naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
davidk committed Sep 30, 2024
1 parent 0d8cafd commit ede0a1b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions getLatestPrusaSlicerRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,10 @@ fi

if [[ "$1" == "url" ]]; then

echo "${releaseInfo}" | jq -r '.assets[] | .browser_download_url | select(test("PrusaSlicer-.+(-\\w)?.(linux64|linux-x64-GTK3)-([^-]+)(.tar.bz2|.AppImage)"))'
echo "${releaseInfo}" | jq -r '.assets[] | .browser_download_url | select(test("PrusaSlicer-.+(-\\w)?.(linux-x64-older|linux64|linux-x64-GTK3).*-([^-]+)(.tar.bz2|.AppImage)"))'

elif [[ "$1" == "name" ]]; then

echo "${releaseInfo}" | jq -r '.assets[] | .name | select(test("PrusaSlicer-.+(-\\w)?.(linux64|linux-x64-GTK3)-([^-]+)(.tar.bz2|.AppImage)"))'

elif [[ "$1" == "url_ver" ]]; then

# Note: Releases sometimes have hex-encoded ascii characters tacked on
# So version '2.0.0+' might need to be requested as '2.0.0%2B' since GitHub returns that as the download URL
echo "${allReleases}" | jq --arg VERSION "$VER" -r '.[] | .assets[] | .browser_download_url | select(test("PrusaSlicer-" + $VERSION + "(\\+|\\%2B)(linux64-.+|linux-x64-GTK3-.+)(.tar.bz2|.AppImage)"))'

elif [[ "$1" == "name_ver" ]]; then

echo "${allReleases}" | jq --arg VERSION "$VER" -r '.[] | .assets[] | .name | select(test("PrusaSlicer-" + $VERSION + "\\+linux64-.+.tar.bz2"))'
echo "${releaseInfo}" | jq -r '.assets[] | .name | select(test("PrusaSlicer-.+(-\\w)?.(linux-x64-older|linux64|linux-x64-GTK3).*-([^-]+)(.tar.bz2|.AppImage)"))'

fi

0 comments on commit ede0a1b

Please sign in to comment.