Skip to content

Commit 01af9c6

Browse files
authored
fix: fix dotnet build Yafc and similar commands. (#520)
#486 broke (or, maybe 'failed to fix') `dotnet build Yafc` and `dotnet run --project Yafc` on clean source or after adding new i18n keys. This fixes those commands again.
2 parents 8ccde24 + 5ab4d83 commit 01af9c6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Yafc.I18n/Yafc.I18n.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10+
<ProjectReference Include="..\Yafc.I18n.Generator\Yafc.I18n.Generator.csproj" PrivateAssets="all" ReferenceOutputAssembly="false" />
1011
<!--Explicitly include the autogenerated files. This makes sure the build will succeed even if they don't exist when the build starts.-->
1112
<Compile Include="LocalizableStringClasses.g.cs" Condition="!Exists('LocalizableStringClasses.g.cs')" />
1213
<Compile Include="LocalizableStrings.g.cs" Condition="!Exists('LocalizableStrings.g.cs')" />

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ rm -rf Build
88
VERSION=$(grep -oPm1 "(?<=<AssemblyVersion>)[^<]+" Yafc/Yafc.csproj)
99
echo "Building YAFC version $VERSION..."
1010

11-
dotnet build Yafc.I18n.Generator
1211
dotnet publish Yafc/Yafc.csproj -r win-x64 -c Release -o Build/Windows
1312
dotnet publish Yafc/Yafc.csproj -r win-x64 --self-contained -c Release -o Build/Windows-self-contained
1413
dotnet publish Yafc/Yafc.csproj -r osx-x64 -c Release -o Build/OSX
1514
dotnet publish Yafc/Yafc.csproj -r osx-arm64 -c Release -o Build/OSX-arm64
1615
dotnet publish Yafc/Yafc.csproj -r linux-x64 -c Release -o Build/Linux
1716

17+
find Build -name "Yafc.I18n.Generator*" -print0 | xargs -0 rm
18+
1819
echo "The libraries of this release were scanned on Virustotal, but we could not reproduce the checksums." > Build/OSX-arm64/_WARNING.TXT
1920
echo "If you want to help with the checksums, please navigate to https://github.com/shpaass/yafc-ce/issues/274" >> Build/OSX-arm64/_WARNING.TXT
2021

0 commit comments

Comments
 (0)