File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,19 @@ if(Test-Path .\artifacts) {
12
12
$branch = @ { $true = $env: APPVEYOR_REPO_BRANCH ; $false = $ (git symbolic- ref -- short - q HEAD) }[$env: APPVEYOR_REPO_BRANCH -ne $NULL ];
13
13
$revision = @ { $true = " {0:00000}" -f [convert ]::ToInt32(" 0" + $env: APPVEYOR_BUILD_NUMBER , 10 ); $false = " local" }[$env: APPVEYOR_BUILD_NUMBER -ne $NULL ];
14
14
$suffix = @ { $true = " " ; $false = " $ ( $branch.Substring (0 , [math ]::Min(10 , $branch.Length ))) -$revision " }[$branch -eq " master" -and $revision -ne " local" ]
15
+ $commitHash = $ (git rev- parse -- short HEAD)
16
+ $buildSuffix = @ { $true = " $ ( $suffix ) -$ ( $commitHash ) " ; $false = " $ ( $branch ) -$ ( $commitHash ) " }[$suffix -ne " " ]
15
17
16
- echo " build: Version suffix is $suffix "
18
+ echo " build: Package version suffix is $suffix "
19
+ echo " build: Build version suffix is $buildSuffix "
17
20
18
21
foreach ($src in ls src/* ) {
19
22
Push-Location $src
20
23
21
24
echo " build: Packaging project in $src "
22
25
23
- & dotnet pack - c Release - o ..\..\artifacts -- version- suffix= $suffix -- include- source
26
+ & dotnet build - c Release -- version- suffix= $buildSuffix
27
+ & dotnet pack - c Release -- include- symbols - o ..\..\artifacts -- version- suffix= $suffix -- no- build
24
28
if ($LASTEXITCODE -ne 0 ) { exit 1 }
25
29
26
30
Pop-Location
Original file line number Diff line number Diff line change
1
+ version : ' {build}'
2
+ skip_tags : true
3
+ image : Visual Studio 2017
4
+ configuration : Release
5
+ test : off
6
+ build_script :
7
+ - ps : ./Build.ps1
8
+ artifacts :
9
+ - path : artifacts/Destructurama.*.nupkg
10
+ deploy :
11
+ - provider : NuGet
12
+ api_key :
13
+ secure : Db273rounfdesOqPXjqPrP6jeHGKkI52Rk+FSdnh6X/S6MuCelVFMpVMn67CcZgv
14
+ skip_symbols : true
15
+ on :
16
+ branch : /^(master|dev)$/
You can’t perform that action at this time.
0 commit comments