Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NuGet API calls in install script #287

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function install_tizenworkload() {

# Check latest version of manifest.
if [[ "$MANIFEST_VERSION" == "<latest>" ]]; 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
Expand Down