Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ jobs:
- name: Restore the application
run: dotnet restore

# We copy the contributors to the "env:Configuration" result, the origin path is now hardcoded so if ever the repo name changes this needs to be changed too
- name: Publish
run: dotnet publish --configuration $env:Configuration --output ./$env:Configuration -r win-x64 /p:Platform=x64
run: |
dotnet publish --configuration $env:Configuration --output ./$env:Configuration -r win-x64 /p:Platform=x64
copy D:/a/WinDurango.UI/WinDurango.UI/Assets/contributors.txt ./$env:Configuration/Assets/contributors.txt
env:
Configuration: ${{ matrix.configuration }}

Expand Down
6 changes: 3 additions & 3 deletions BuildScripts/build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python -m venv BuildScripts\venv
BuildScripts\venv\Scripts\activate
python -m venv .\venv
call .\venv\Scripts\activate
pip install requests
py BuildScripts\contributors.py
py .\contributors.py
4 changes: 3 additions & 1 deletion BuildScripts/contributors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import os

f = open('Assets/contributors.txt', 'w+')
f = open(os.path.join(os.path.dirname(__file__), "..", "Assets", "contributors.txt"), "w+")

try:
import requests
Expand All @@ -27,6 +27,8 @@
print("Couldn't fetch contributor information.")
exit(0)



f.close()


19 changes: 11 additions & 8 deletions Pages/AboutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ public AboutPage()
{
this.InitializeComponent();

string[] lines = File.ReadAllLines("Assets/contributors.txt");
foreach (var contributor in lines)
if (File.Exists("Assets/contributors.txt"))
{
string[] info = contributor.Split(";");
string name = info[0].Replace("WD_CONTRIB_SEMICOLON", ";");
string avatar = info[1].Replace("WD_CONTRIB_SEMICOLON", ";");
string link = info[2].Replace("WD_CONTRIB_SEMICOLON", ";");
string contributionCount = info[3];
string[] lines = File.ReadAllLines("Assets/contributors.txt");
foreach (var contributor in lines)
{
string[] info = contributor.Split(";");
string name = info[0].Replace("WD_CONTRIB_SEMICOLON", ";");
string avatar = info[1].Replace("WD_CONTRIB_SEMICOLON", ";");
string link = info[2].Replace("WD_CONTRIB_SEMICOLON", ";");
string contributionCount = info[3];

contributorList.Children.Add(new ContributorInfo(name, avatar, link));
contributorList.Children.Add(new ContributorInfo(name, avatar, link));
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion WinDurango.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="BuildScripts\build.bat" />
<Exec Command="build.bat" WorkingDirectory="$(ProjectDir)\BuildScripts" />
</Target>

</Project>
Loading