mirror of
https://github.com/WinDurango/WinDurango.UI.git
synced 2026-01-31 00:55:24 +01:00
Merge pull request #11 from atomsk-0/contributorsPatch
contributors parsing should work now?
This commit is contained in:
5
.github/workflows/dotnet-desktop.yml
vendored
5
.github/workflows/dotnet-desktop.yml
vendored
@@ -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 }}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -27,6 +27,8 @@ except:
|
||||
print("Couldn't fetch contributor information.")
|
||||
exit(0)
|
||||
|
||||
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
@@ -14,16 +14,19 @@ namespace WinDurango.UI.Pages
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +229,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="BuildScripts\build.bat" />
|
||||
<Exec Command="build.bat" WorkingDirectory="$(ProjectDir)\BuildScripts" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user