forked from BoletoNet/BoletoNetCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
28 lines (22 loc) · 1.04 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$rootDir = $env:APPVEYOR_BUILD_FOLDER
$buildNumber = $env:APPVEYOR_BUILD_NUMBER
<#Pacote Principal#>
$solutionFile = "$rootDir\BoletoNetCore\BoletoNetCore.csproj"
$solutionTest = "$rootDir\BoletoNetCore.Testes\BoletoNetCore.Testes.csproj"
$nuspecPath = "$rootDir\BoletoNetCore\BoletoNetCore.nuspec"
$nupkgPath = "$rootDir\NuGet\"
[xml]$xml = cat $nuspecPath
$xml.package.metadata.version="3.0.1."+"$buildNumber"
$xml.Save($nuspecPath)
dotnet publish -f netstandard2.0 -c release $solutionFile
dotnet pack -c release $solutionFile /p:NuspecFile=$nuspecPath -o $nupkgPath
appveyor PushArtifact $nupkgPath
# <#Pacote PDF#>
# $solutionFilePDF = "$rootDir\BoletoNetCore.PDF\BoletoNetCore.PDF.csproj"
# $nuspecPathPDF = "$rootDir\BoletoNetCore.PDF\BoletoNetCore.PDF.nuspec"
# $nupkgPathPDF = "$rootDir\NuGet.PDF\"
# [xml]$xmlPDF = cat $nuspecPathPDF
# $xmlPDF.package.metadata.version="3.0.1."+"$buildNumber"
# $xmlPDF.Save($nuspecPathPDF)
# dotnet pack -c Release $solutionFilePDF /p:NuspecFile=$nuspecPathPDF -o $nupkgPathPDF
# appveyor PushArtifact $nupkgPathPDF