mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
chore: output assembly ver for builds
This commit is contained in:
parent
c4a4b873d3
commit
2f4efe4e50
2 changed files with 8 additions and 9 deletions
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
|
|
@ -56,12 +56,6 @@ jobs:
|
||||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||||
id: extract_branch
|
id: extract_branch
|
||||||
|
|
||||||
# GitHub only ships the LTS, which is stuck on .NET 6
|
|
||||||
- name: Install PowerShell latest
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
|
|
||||||
|
|
||||||
- name: Generate dalamud-distrib version file
|
- name: Generate dalamud-distrib version file
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
|
|
@ -75,9 +69,7 @@ jobs:
|
||||||
$branchName = "stg"
|
$branchName = "stg"
|
||||||
}
|
}
|
||||||
|
|
||||||
$dllBytes = [System.IO.File]::ReadAllBytes("$(Get-Location)\scratch\Dalamud.dll")
|
$newVersion = [System.IO.File]::ReadAllText("$(Get-Location)\scratch\TEMP_assver.txt")
|
||||||
$assembly = [System.Reflection.Assembly]::Load($dllBytes)
|
|
||||||
$newVersion = $assembly.GetCustomAttributes([System.Reflection.AssemblyMetadataAttribute]) | Where { $_.GetType() -eq [System.Reflection.AssemblyMetadataAttribute] } | Select -First 1 | Select -ExpandProperty "Value"
|
|
||||||
Remove-Item -Force -Recurse .\scratch
|
Remove-Item -Force -Recurse .\scratch
|
||||||
|
|
||||||
if (Test-Path -Path $branchName) {
|
if (Test-Path -Path $branchName) {
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,13 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="TempWriteAssemblyVersion" BeforeTargets="CoreCompile">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TempAssemblyNameFile>$(OutputPath)TEMP_assver.txt</TempAssemblyNameFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Exec Command="echo $(DalamudVersion) > $(TempAssemblyNameFile)" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
<Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''">
|
<Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- temp file for the git version (lives in "obj" folder)-->
|
<!-- temp file for the git version (lives in "obj" folder)-->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue