Skip to content

Commit 3b82141

Browse files
committed
Update .NET SDK to 0.21.2 and improve release detection
- Update .NET SDK version to 0.21.2 with Object[] deserialization fix - Update sdk-generator dependency from 1.4.3 to 1.4.4 - Improve SDK release detection to check actual commit SHA of latest release tag instead of just checking releases targeting the branch
1 parent e303501 commit 3b82141

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

app/config/platforms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
[
358358
'key' => 'dotnet',
359359
'name' => '.NET',
360-
'version' => '0.21.1',
360+
'version' => '0.21.2',
361361
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
362362
'package' => 'https://www.nuget.org/packages/Appwrite',
363363
'enabled' => true,

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/sdks/dotnet/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.21.2
4+
5+
* Fix: handle Object[] during array deserialization
6+
37
## 0.21.1
48

59
* Add transaction support for Databases and TablesDB

src/Appwrite/Platform/Tasks/SDKs.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,17 @@ public function action(?string $selectedPlatform, ?string $selectedSDK, ?string
285285
$latestCommitSha = trim(\shell_exec($latestCommitCommand) ?? '');
286286

287287
if (!empty($latestCommitSha)) {
288-
$commitReleasesCommand = 'gh api repos/' . $repoName . '/releases --jq ".[] | select(.target_commitish == \"' . $releaseTarget . '\") | .tag_name" 2>/dev/null | head -n 1';
289-
$existingCommitRelease = trim(\shell_exec($commitReleasesCommand) ?? '');
290-
291-
if (!empty($existingCommitRelease)) {
292-
Console::warning("Latest commit on {$releaseTarget} already has a release ({$existingCommitRelease}) for {$language['name']} SDK, skipping to avoid empty release...");
293-
continue;
288+
$latestReleaseTagCommand = 'gh api repos/' . $repoName . '/releases --jq ".[0] | .tag_name" 2>/dev/null';
289+
$latestReleaseTag = trim(\shell_exec($latestReleaseTagCommand) ?? '');
290+
291+
if (!empty($latestReleaseTag)) {
292+
$tagCommitCommand = 'gh api repos/' . $repoName . '/git/ref/tags/' . $latestReleaseTag . ' --jq ".object.sha" 2>/dev/null';
293+
$tagCommitSha = trim(\shell_exec($tagCommitCommand) ?? '');
294+
295+
if (!empty($tagCommitSha) && $latestCommitSha === $tagCommitSha) {
296+
Console::warning("Latest commit on {$releaseTarget} already has a release ({$latestReleaseTag}) for {$language['name']} SDK, skipping to avoid empty release...");
297+
continue;
298+
}
294299
}
295300
}
296301

0 commit comments

Comments
 (0)