Skip to content

Commit

Permalink
Merge pull request #6 from AndreyRusyaev/feature/update-build-scripts
Browse files Browse the repository at this point in the history
Migrate to use dotnet instead of msbuild.
  • Loading branch information
AndreyRusyaev authored Dec 7, 2022
2 parents 0c2f5fd + 9e38f9f commit a6c475a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 4 additions & 6 deletions build/build.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
msbuild "../src/acryptohashnet.sln" /p:Configuration=Release
@echo off
setlocal

SET OutDir=../src/acryptohashnet/bin/Release/
SET TargetDir=../bin/

xcopy /I /Y /F "%OutDir%netstandard2.1/" "%TargetDir%"
xcopy /I /Y /F "%OutDir%*.nupkg" "%TargetDir%"
powershell -ExecutionPolicy ByPass -NoProfile -file ./build.ps1
exit /b %ERRORLEVEL%
11 changes: 7 additions & 4 deletions build/build.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Set-StrictMode -version Latest
Set $ErrorActionPreference='Stop'

$Configuration = "Release"

$SrcDir = "$PSScriptRoot/../src";
$OutDir = "$PSScriptRoot/../src/acryptohashnet/bin/Release"
$OutDir = "$PSScriptRoot/../src/acryptohashnet/bin/$Configuration"
$TargetDir = "$PSScriptRoot/../bin"

msbuild.exe "$SrcDir/acryptohashnet.sln" /p:Configuration=Release
dotnet build "$SrcDir/acryptohashnet.sln" --configuration $Configuration

New-Item -Force -Type Directory $TargetDir
Copy-Item -Force "$OutDir/netstandard2.1/*" $TargetDir
New-Item -Force -Type Directory $TargetDir | Out-Null
Copy-Item -Force "$OutDir/netstandard2.1/*.dll" $TargetDir
Copy-Item -Force "$OutDir/*.nupkg" $TargetDir

0 comments on commit a6c475a

Please sign in to comment.