mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
给所有项目添加 BuildInfo & 输出的 flv 里标记正确的版本号而不是 TEST
This commit is contained in:
parent
724d87c4ac
commit
3ed24bfcd1
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -261,5 +261,5 @@ paket-files/
|
|||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
BililiveRecorder.WPF/BuildInfo.cs
|
||||
**/BuildInfo.cs
|
||||
BililiveRecorder.WPF/Nlog.config
|
||||
|
|
|
@ -24,4 +24,8 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\BililiveRecorder.FlvProcessor\BililiveRecorder.FlvProcessor.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cd $(SolutionDir)
|
||||
powershell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1 Core</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -283,7 +283,7 @@ namespace BililiveRecorder.Core
|
|||
},
|
||||
{
|
||||
"version",
|
||||
"TEST"
|
||||
BuildInfo.Version + " " + BuildInfo.HeadShaShort
|
||||
},
|
||||
{
|
||||
"roomid",
|
||||
|
|
|
@ -20,4 +20,8 @@
|
|||
<PackageReference Include="Autofac" Version="4.8.1" />
|
||||
<PackageReference Include="NLog" Version="4.5.10" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cd $(SolutionDir)
|
||||
powershell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1 FlvProcessor</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -196,7 +196,6 @@
|
|||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="BuildInfo.txt" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
<Resource Include="ico.ico" />
|
||||
<Content Include="NLog.config">
|
||||
|
@ -225,7 +224,7 @@
|
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cd $(SolutionDir)
|
||||
PowerShell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1
|
||||
powershell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1 WPF
|
||||
copy /y .\BililiveRecorder.WPF\Nlog.$(ConfigurationName).config .\BililiveRecorder.WPF\NLog.config</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace BililiveRecorder.WPF
|
||||
namespace BililiveRecorder.[PROJECT_NAME]
|
||||
{
|
||||
internal class BuildInfo
|
||||
{
|
|
@ -4,4 +4,4 @@ $isAppveyor = if ($env:APPVEYOR -eq $null) { "false" } else { $env:APPVEYOR }
|
|||
$buildversion = if ($env:APPVEYOR_BUILD_VERSION -eq $null) { "本地编译" } else { $env:APPVEYOR_BUILD_VERSION }
|
||||
$githash = git rev-parse --verify HEAD
|
||||
|
||||
(Get-Content .\BililiveRecorder.WPF\BuildInfo.txt).Replace('[APPVEYOR]', $isAppveyor.ToLower()).Replace('[VERSION]', $buildversion).Replace('[GIT_HASH]', $githash).Replace('[GIT_HASH_S]', $githash.Substring(0, 8)) | Set-Content .\BililiveRecorder.WPF\BuildInfo.cs
|
||||
(Get-Content .\BuildInfo.txt).Replace('[PROJECT_NAME]', $args).Replace('[APPVEYOR]', $isAppveyor.ToLower()).Replace('[VERSION]', $buildversion).Replace('[GIT_HASH]', $githash).Replace('[GIT_HASH_S]', $githash.Substring(0, 8)) | Set-Content ".\BililiveRecorder.$args\BuildInfo.cs"
|
||||
|
|
Loading…
Reference in New Issue
Block a user