From 567294a7f67e46808fbfd7c9841e9d720aacbd13 Mon Sep 17 00:00:00 2001 From: Dawei Huang Date: Tue, 29 Oct 2024 10:28:17 +0100 Subject: [PATCH 1/3] Fix NuGet API calls in install script --- workload/scripts/workload-install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workload/scripts/workload-install.ps1 b/workload/scripts/workload-install.ps1 index 0780bf4..46a206c 100644 --- a/workload/scripts/workload-install.ps1 +++ b/workload/scripts/workload-install.ps1 @@ -85,7 +85,7 @@ function Get-LatestVersion([string]$Id) { { try { - $Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$Id/index.json -UseBasicParsing | ConvertFrom-Json + $Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$($Id.ToLowerInvariant())/index.json -UseBasicParsing | ConvertFrom-Json return $Response.versions | Select-Object -Last 1 } catch { From efffe7f80e73c16df16aa4369fb0308839480c4b Mon Sep 17 00:00:00 2001 From: Dawei Huang Date: Tue, 29 Oct 2024 10:50:29 +0100 Subject: [PATCH 2/3] Update for bash --- workload/scripts/workload-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workload/scripts/workload-install.sh b/workload/scripts/workload-install.sh index 36e304c..1a0931d 100755 --- a/workload/scripts/workload-install.sh +++ b/workload/scripts/workload-install.sh @@ -187,7 +187,7 @@ function install_tizenworkload() { # Check latest version of manifest. if [[ "$MANIFEST_VERSION" == "" ]]; then - MANIFEST_VERSION=$(curl -s https://api.nuget.org/v3-flatcontainer/$MANIFEST_NAME/index.json | grep \" | tail -n 1 | tr -d '\r' | xargs) + MANIFEST_VERSION=$(curl -s https://api.nuget.org/v3-flatcontainer/${MANIFEST_NAME,,}/index.json | grep \" | tail -n 1 | tr -d '\r' | xargs) if [ -n "$MANIFEST_VERSION" ] && echo "$MANIFEST_VERSION" | grep -q "BlobNotFound"; then MANIFEST_VERSION=$(getLatestVersion "$MANIFEST_NAME") if [[ -n $MANIFEST_VERSION ]]; then From 33f64f64d59eef9a7eabd88b36ab21100745bf87 Mon Sep 17 00:00:00 2001 From: Dawei Huang Date: Tue, 29 Oct 2024 11:35:22 +0100 Subject: [PATCH 3/3] Update workload-install.sh --- workload/scripts/workload-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workload/scripts/workload-install.sh b/workload/scripts/workload-install.sh index 1a0931d..9cbc44b 100755 --- a/workload/scripts/workload-install.sh +++ b/workload/scripts/workload-install.sh @@ -187,7 +187,7 @@ function install_tizenworkload() { # Check latest version of manifest. if [[ "$MANIFEST_VERSION" == "" ]]; then - MANIFEST_VERSION=$(curl -s https://api.nuget.org/v3-flatcontainer/${MANIFEST_NAME,,}/index.json | grep \" | tail -n 1 | tr -d '\r' | xargs) + MANIFEST_VERSION=$(curl -s https://api.nuget.org/v3-flatcontainer/${MANIFEST_NAME,,}/index.json | grep \" | tail -n 1 | tr -d '\r' | xargs) if [ -n "$MANIFEST_VERSION" ] && echo "$MANIFEST_VERSION" | grep -q "BlobNotFound"; then MANIFEST_VERSION=$(getLatestVersion "$MANIFEST_NAME") if [[ -n $MANIFEST_VERSION ]]; then