Skip to content

Commit

Permalink
Sync code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Nov 18, 2024
1 parent ed9c07e commit 6861c34
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: make test
working-directory: ./workload

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: tizen-workload-pkgs
path: ./workload/out/nuget-unsigned/*.nupkg
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Install Github Package Registry Tool
run: dotnet tool install --global --no-cache gpr

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: tizen-workload-pkgs

Expand Down
2 changes: 1 addition & 1 deletion workload/build/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
example: -preview.3.100+sha12345
-->
<PropertyGroup>
<TizenWorkloadVersion>8.0.158</TizenWorkloadVersion>
<TizenWorkloadVersion>8.0.159</TizenWorkloadVersion>
</PropertyGroup>

<!--
Expand Down
42 changes: 22 additions & 20 deletions workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $LatestVersionMap = @{
"$ManifestBaseName-6.0.100" = "7.0.101";
"$ManifestBaseName-6.0.200" = "7.0.100-preview.13.6";
"$ManifestBaseName-6.0.300" = "8.0.133";
"$ManifestBaseName-6.0.400" = "8.0.140";
"$ManifestBaseName-6.0.400" = "8.0.154";
"$ManifestBaseName-7.0.100-preview.6" = "7.0.100-preview.6.14";
"$ManifestBaseName-7.0.100-preview.7" = "7.0.100-preview.7.20";
"$ManifestBaseName-7.0.100-rc.1" = "7.0.100-rc.1.22";
Expand All @@ -53,12 +53,14 @@ $LatestVersionMap = @{
"$ManifestBaseName-8.0.100-rtm" = "7.0.127";
"$ManifestBaseName-8.0.100" = "8.0.144";
"$ManifestBaseName-8.0.200" = "8.0.145";
"$ManifestBaseName-8.0.300" = "8.0.149";
"$ManifestBaseName-8.0.400" = "8.0.155";
"$ManifestBaseName-9.0.100-alpha.1" = "8.0.134";
"$ManifestBaseName-9.0.100-preview.1" = "8.0.135";
"$ManifestBaseName-9.0.100-preview.2" = "8.0.137";
"$ManifestBaseName-9.0.100-preview.3" = "8.0.148";
"$ManifestBaseName-9.0.100-rc.1" = "8.0.152";
"$ManifestBaseName-9.0.100" = "8.0.158";
"$ManifestBaseName-9.0.100" = "8.0.159";
}

function New-TemporaryDirectory {
Expand All @@ -79,29 +81,29 @@ function Ensure-Directory([string]$TestDir) {
}

function Get-LatestVersion([string]$Id) {
$attempts=3
$sleepInSeconds=3
do
{
try
{
$Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$Id/index.json -UseBasicParsing | ConvertFrom-Json
return $Response.versions | Select-Object -Last 1
}
catch {
Write-Host "Id: $Id"
Write-Host "An exception was caught: $($_.Exception.Message)"
}

$attempts--
if ($attempts -gt 0) { Start-Sleep $sleepInSeconds }
} while ($attempts -gt 0)

if ($LatestVersionMap.ContainsKey($Id))
{
Write-Host "Return cached latest version."
return $LatestVersionMap.$Id
} else {
$attempts=3
$sleepInSeconds=3
do
{
try
{
$Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$Id/index.json -UseBasicParsing | ConvertFrom-Json
return $Response.versions | Select-Object -Last 1
}
catch {
Write-Host "Id: $Id"
Write-Host "An exception was caught: $($_.Exception.Message)"
}

$attempts--
if ($attempts -gt 0) { Start-Sleep $sleepInSeconds }
} while ($attempts -gt 0)

Write-Error "Wrong Id: $Id"
}
}
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 @@ -43,7 +43,7 @@ LatestVersionMap=(
"$MANIFEST_BASE_NAME-9.0.100-preview.2=8.0.137"
"$MANIFEST_BASE_NAME-9.0.100-preview.3=8.0.148"
"$MANIFEST_BASE_NAME-9.0.100-rc.1=8.0.152"
"$MANIFEST_BASE_NAME-9.0.100=8.0.158"
"$MANIFEST_BASE_NAME-9.0.100=8.0.159"
)

while [ $# -ne 0 ]; do
Expand Down
6 changes: 3 additions & 3 deletions workload/src/Samsung.NET.Sdk.Tizen/WorkloadManifest.in.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
},
"Samsung.Tizen.Sdk.net6": {
"kind": "sdk",
"version": "7.0.119",
"version": "8.0.154",
"alias-to": {
"any": "Samsung.Tizen.Sdk"
}
},
"Samsung.Tizen.Sdk.net7": {
"kind": "sdk",
"version": "7.0.123",
"version": "8.0.141",
"alias-to": {
"any": "Samsung.Tizen.Sdk"
}
},
"Samsung.Tizen.Sdk.net8": {
"kind": "sdk",
"version": "7.0.125",
"version": "8.0.157",
"alias-to": {
"any": "Samsung.Tizen.Sdk"
}
Expand Down
24 changes: 13 additions & 11 deletions workload/src/Samsung.Tizen.Build.Tasks/GetTizenProject.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Linq;


using Microsoft.Build.Evaluation;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand Down Expand Up @@ -32,12 +32,12 @@ public ITaskItem[] ProjectFiles
[Output]
public ITaskItem[] TizenProjectFiles
{
set
set
{
if (value != null)
{
tizenProjectFiles = value.ToList();
}
if (value != null)
{
tizenProjectFiles = value.ToList();
}
}
get { return tizenProjectFiles?.ToArray(); }
}
Expand All @@ -48,8 +48,7 @@ public override bool Execute()
var properties = new Dictionary<string, string>
{
{ "Configuration", "$(Configuration)" },
{ "Platform", "$(Platform)" },
{ "TargetFramework", "$(TargetFramework)" }
{ "Platform", "$(Platform)" }
};

Log.LogMessage(MessageImportance.High, "Configuration : {0}", Configuration);
Expand All @@ -64,8 +63,11 @@ public override bool Execute()
// we don't get a redundant-project-load error.
var collection = new ProjectCollection(properties);
var project = collection.LoadProject(pItem.ItemSpec);
ProjectProperty pp = project.Properties.Where(p => p.Name == "TizenProject" && p.EvaluatedValue == "true").FirstOrDefault();
if (pp != null)

var targetFrameworkValue = project.GetPropertyValue("TargetFramework");
var targetFrameworksValue = project.GetPropertyValue("TargetFrameworks");

if (targetFrameworkValue.Contains("-tizen") || targetFrameworksValue.Contains("-tizen"))
{
tizenList.Add(pItem);
}
Expand All @@ -78,4 +80,4 @@ public override bool Execute()

}

}
}
1 change: 0 additions & 1 deletion workload/src/Samsung.Tizen.Sdk/Sdk/AutoImport.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/
<TizenManifestFile Condition="'$(TizenManifestFile)' == ''">tizen-manifest.xml</TizenManifestFile>
<TizenResourcePrefix Condition="'$(TizenResourcePrefix)' == ''">res</TizenResourcePrefix>
<TizenSharedPrefix Condition="'$(TizenSharedPrefix)' == ''">shared</TizenSharedPrefix>
<TizenProject>true</TizenProject>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 6861c34

Please sign in to comment.