Skip to content

Commit

Permalink
version from entry.tp for tpp-name
Browse files Browse the repository at this point in the history
  • Loading branch information
TripleT3005 authored and TripleT3005 committed Aug 13, 2023
1 parent e703eaa commit 57738e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CheckProcess/publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ dotnet clean "$ProjectName.csproj" --configuration $Configuration
Write-Host "Publishing '$ProjectName' to '$PublishFolderFiles' ..."
dotnet publish "$ProjectName.csproj" --output "$PublishFolderFiles" --configuration $Configuration -p:Platform=$Platform


$FileVersion = (Get-Command $PublishFolderFiles\$ProjectName.dll).FileVersionInfo.ProductVersion
$jsonContent = Get-Content -Path ".\entry.tp" -Raw
$jsonObject = ConvertFrom-Json $jsonContent
$ProjectVersion = $jsonObject.version

copy "entry.tp" "$PublishFolderRoot"

$TppFile = "$PublishFolder\$ProjectName-$FileVersion.tpp"
$TppFile = "$PublishFolder\$ProjectName-$ProjectVersion.tpp"
if (Test-Path $TppFile) {
Remove-Item $TppFile -Force
}
Expand Down

0 comments on commit 57738e4

Please sign in to comment.