Skip to content

Commit 4cba2dd

Browse files
authored
Fix CloudSimth requestUri (#124)
1 parent 3b29fb1 commit 4cba2dd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nanoFirmwareFlasher.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29806.167
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.32014.148
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nanoFirmwareFlasher", "nanoFirmwareFlasher\nanoFirmwareFlasher.csproj", "{762BA2A1-B3E9-4E26-9491-AE11D1F1C1EA}"
77
EndProject

nanoFirmwareFlasher/FirmwarePackage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public static List<CloudSmithPackageDetail> GetTargetList(
9797

9898
// NOTE: the query seems to be the oposite, it should be LESS THAN.
9999
// this has been reported to Cloudsmith and it's being checked. Maybe need to revisit this if changes are made in their API.
100-
string requestUri = $"{repoName}/?page_size=500&q=uploaded:'>1 month ago' AND tag:{platform}";
100+
// Because new stable releases are published on a regular basis and preview very rarely, we query for stable versions published in past month and preview versions published during the past 6 months.
101+
string requestUri = $"{repoName}/?page_size=500&q=uploaded:'>{(preview ? "6" : "1")} month ago' {(platform.HasValue ? "AND tag:" + platform.Value : "")}";
101102

102103
List<CloudSmithPackageDetail> targetPackages = new();
103104

0 commit comments

Comments
 (0)