Skip to content

Commit

Permalink
update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Dec 24, 2023
1 parent b85016a commit 17c0e34
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 16 deletions.
50 changes: 50 additions & 0 deletions build-all.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
$BuildPath = "$PSScriptRoot\build"
$BuildPathWinX64 = "$BuildPath\win-x64"
$BuildPathLinuxX64 = "$BuildPath\linux-x64"
$BuildPathLinuxARM64 = "$BuildPath\linux-arm64"
$Version = Get-Date -Format "yyyy-MM-dd" # 2020-11-1
$VersionDot = $Version -replace '-','.'

# Dotnet restore and build
dotnet publish "$PSScriptRoot\src\Ve.Direct.InfluxDB.Collector\Ve.Direct.InfluxDB.Collector.csproj" `
--runtime win-x64 `
--self-contained false `
-c Release `
-v minimal `
-o $BuildPathWinX64 `
-f net8.0 `
-p:PublishReadyToRun=false `
-p:PublishSingleFile=true `
-p:CopyOutputSymbolsToPublishDirectory=false `
-p:Version=$VersionDot `
--nologo

dotnet publish "$PSScriptRoot\src\Ve.Direct.InfluxDB.Collector\Ve.Direct.InfluxDB.Collector.csproj" `
--runtime linux-x64 `
--self-contained false `
-c Release `
-v minimal `
-o $BuildPathLinuxX64 `
-f net8.0 `
-p:PublishReadyToRun=false `
-p:PublishSingleFile=true `
-p:CopyOutputSymbolsToPublishDirectory=false `
-p:Version=$VersionDot `
--nologo

dotnet publish "$PSScriptRoot\src\Ve.Direct.InfluxDB.Collector\Ve.Direct.InfluxDB.Collector.csproj" `
--runtime linux-arm64 `
--self-contained false `
-c Release `
-v minimal `
-o $BuildPathLinuxARM64 `
-f net8.0 `
-p:PublishReadyToRun=false `
-p:PublishSingleFile=true `
-p:CopyOutputSymbolsToPublishDirectory=false `
-p:Version=$VersionDot `
--nologo

Compress-Archive -Path "$BuildPathWinX64" -DestinationPath "$BuildPathWinX64"
Compress-Archive -Path "$BuildPathLinuxX64" -DestinationPath "$BuildPathLinuxX64"
Compress-Archive -Path "$BuildPathLinuxARM64" -DestinationPath "$BuildPathLinuxARM64"
16 changes: 0 additions & 16 deletions win-build.ps1

This file was deleted.

0 comments on commit 17c0e34

Please sign in to comment.