Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to build.ps1 #647

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,7 @@ build:
skip_tags: true

build_script:
- ps: |
$versionPrefix = "4.11.0"
$versionSuffix = ""
$versionBuild = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
$versionNuget = $versionPrefix
if ($env:APPVEYOR_PULL_REQUEST_NUMBER)
{
$versionPrefix = $versionBuild
$versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}
if ($versionSuffix)
{
$versionNuget = $versionPrefix + "-" + $versionSuffix
}
$build_aspnet = "build_aspnet.bat", "-version_prefix=$versionPrefix", "-version_build=$versionBuild", "-version_suffix=$versionSuffix"
& cmd /c $build_aspnet
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
- ps: .\build.ps1

deploy:
- provider: NuGet
Expand Down
28 changes: 28 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# restore and builds all projects as release.
# creates NuGet package at \artifacts
dotnet --version

$versionPrefix = "4.11.0" # Also update version for minor versions in appveyor.yml
$versionSuffix = ""
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$versionPrefix = $versionFile
$versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}

msbuild NLog.Web.sln /t:restore,rebuild /p:configuration=release /p:ContinuousIntegrationBuild=true /verbosity:minimal
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}

msbuild src\NLog.Web /t:rebuild,pack /p:configuration=release /verbosity:minimal /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}

msbuild src\NLog.Web.AspNetCore /t:rebuild,pack /p:configuration=release /verbosity:minimal /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile
if (-Not $LastExitCode -eq 0) {
exit $LastExitCode
}

exit $LastExitCode
34 changes: 0 additions & 34 deletions build_aspnet.bat

This file was deleted.