Skip to content

Commit

Permalink
[Build] modified the TFM sorted in descending order (#6549)
Browse files Browse the repository at this point in the history
  • Loading branch information
JongHeonChoi authored Jan 13, 2025
1 parent a9da0ae commit 2756e14
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packaging/csapi-tizenfx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%define DOTNET_NUGET_SOURCE /nuget

%define TIZEN_NET_RUNTIME_IDENTIFIERS 10.0.0:9.0.0:8.0.0:7.0.0:6.5.0:6.0.0:5.5.0:5.0.0:4.0.0
%define TIZEN_NET_TARGET_FRAMEWORK_MONIKERS net8.0-tizen10.0:net6.0-tizen9.0:net6.0-tizen8.0:net6.0-tizen:net6.0:tizen10.0:tizen90:tizen80:tizen70:tizen60:tizen50:tizen40
%define TIZEN_NET_TARGET_FRAMEWORK_MONIKERS net8.0-tizen10.0:net8.0-tizen:net8.0:net6.0-tizen9.0:net6.0-tizen8.0:net6.0-tizen:net6.0:tizen10.0:tizen90:tizen80:tizen70:tizen60:tizen50:tizen40

%define UPGRADE_SCRIPT_PATH /usr/share/upgrade/scripts

Expand Down
18 changes: 7 additions & 11 deletions packaging/maketfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@

tfm_list1 = [] #tizen90, tizen80, tizen70, tizen60, tizen50, tizen40
tfm_list2 = [] #tizen10.0
tfm_list3 = [] #net6.0-tizen9.0, net6.0-tizen8.0, net6.0-tizen, net6.0
tfm_list3 = [] #net8.0-tizen10.0, net8.0-tizen, net8.0, net6.0-tizen9.0, net6.0-tizen8.0, net6.0-tizen, net6.0

def sort_tfm(tfm):
tfm = list(set(tfm))
return sorted(tfm, reverse=True)

for meta_child in root.iter():
if meta_child.tag == "{http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd}metadata":
for depen_child in meta_child:
Expand All @@ -26,16 +31,7 @@
tfm_list3.append(tfm.strip() + "-tizen")
tfm_list3.append(tfm.strip())


tfm_list1 = list(set(tfm_list1))
tfm_list1.sort(reverse=True)
tfm_list2 = list(set(tfm_list2))
tfm_list2.sort(reverse=True)
tfm_list3 = list(set(tfm_list3))
tfm_list3.sort(key=len)
tfm_list3.sort(key=lambda s: float(re.search(r'(\d+)\.', s).group()[0]))
tfm_list3.reverse()
tfm_list = tfm_list3 + tfm_list2 + tfm_list1
tfm_list = sort_tfm(tfm_list3) + sort_tfm(tfm_list2) + sort_tfm(tfm_list1)

f = open(spec_dir,'r')
origin_data = f.read()
Expand Down
12 changes: 8 additions & 4 deletions pkg/Tizen.NET/Tizen.NET.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@
<dependency id="Tizen.NET.API12" version="12.0.0.18510" />
<dependency id="Microsoft.NETCore.Platforms" version="6.0.9" />
</group>
<group targetFramework="net8.0-tizen10.0">
<dependency id="Tizen.NET.API13" version="$fxversion$" />
<dependency id="Microsoft.NETCore.Platforms" version="6.0.9" />
</group>
<group targetFramework="net6.0">
<dependency id="Tizen.NET.API12" version="12.0.0.18510" />
<dependency id="Microsoft.NETCore.Platforms" version="6.0.9" />
</group>
<group targetFramework="net8.0-tizen10.0">
<dependency id="Tizen.NET.API13" version="$fxversion$" />
<dependency id="Microsoft.NETCore.Platforms" version="8.0.11" />
</group>
<group targetFramework="net8.0">
<dependency id="Tizen.NET.API13" version="$fxversion$" />
<dependency id="Microsoft.NETCore.Platforms" version="8.0.11" />
</group>
</dependencies>
</metadata>
<files>
Expand Down

0 comments on commit 2756e14

Please sign in to comment.