ソースを参照

Merge branch 'h3o66-fix/csgo-get5mod' into develop
fix(mods): fix csgo get5 fetching for the latest version

Daniel Gibbs 5 年 前
コミット
d656bebfd0
1 ファイル変更4 行追加4 行削除
  1. 4 4
      lgsm/functions/mods_list.sh

+ 4 - 4
lgsm/functions/mods_list.sh

@@ -30,10 +30,10 @@ steamworkslatestfile=$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -
 steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}"
 steamworksurl="${steamworksdownloadurl}"
 # CS:GO Mods
-get5scrapepath=$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "<relativePath>\K(.+)(?=</relativePath>)")
-get5latestfile=$(echo -e "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo -e "basename "@""")
-get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}"
-get5url="${get5downloadurl}"
+get5lastbuild=$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/json | jq -r '.artifacts[]')
+get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.fileName')
+get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath')
+get5url="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5latestfilepath}"
 csgopuglatest=$(curl -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]')
 csgopuglatestfile=$(echo -e "${}" | jq -r '.name')
 csgopuglatestlink=$(echo -e "${}" | jq -r '.browser_download_url')