File tree Expand file tree Collapse file tree 3 files changed +36
-16
lines changed Expand file tree Collapse file tree 3 files changed +36
-16
lines changed Original file line number Diff line number Diff line change 1- # only need to commit assembly info changes when build is NOT for a pull-request
2- if ($env: appveyor_pull_request_number )
1+ # Copyright (c) 2018 The nanoFramework project contributors
2+ # See LICENSE file in the project root for full license information.
3+
4+ # skip updating assembly info changes if build is a pull-request or not a tag (can't commit when repo is in a tag)
5+ if ($env: appveyor_pull_request_number -or $env: APPVEYOR_REPO_TAG -eq " true" )
36{
4- ' Skip committing assembly info changes as this is a PR build...' | Write-Host - ForegroundColor White
7+ ' Skip committing assembly info changes as this is not a tag build...' | Write-Host - ForegroundColor White
58}
69else
710{
1518
1619 # clone nf-interpreter repo (only a shallow clone with last commit)
1720 git clone https:// github.com / nanoframework/ nf- interpreter - b develop -- depth 1 - q
18- cd nf- interpreter
21+ cd nf- interpreter > $null
1922
2023 # new branch name
2124 $newBranch = " $env: APPVEYOR_REPO_BRANCH -nfbot/update-version/nanoFramework.CorLib/$env: GitVersion_NuGetVersionV2 "
5154
5255 # commit changes
5356 git add - A 2>&1
54- git commit - m" $commitMessage " - m " [version update] " - q
57+ git commit - m" $commitMessage " - q
5558 git push -- set-upstream origin " $newBranch " -- porcelain - q > $null
5659
5760 # start PR
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2018 The nanoFramework project contributors
2+ # See LICENSE file in the project root for full license information.
3+
14# generate change log when build is NOT for a pull-request
2- if ($env: appveyor_pull_request_number )
5+ if ($env: appveyor_pull_request_number -or $ env: APPVEYOR_REPO_TAG -eq " true " )
36{
4- ' Skip change log processing as this is a PR build ...' | Write-Host - ForegroundColor White
7+ ' Skip change log processing...' | Write-Host - ForegroundColor White
58}
69else
710{
811 # need this to keep ruby happy
9- md c:\tmp
12+ md c:\tmp > $null
1013
11- # generate change log
12- # version includes commits
13- bundle exec github_changelog_generator -- token $env: GitHubToken
14+ if ($env: APPVEYOR_REPO_BRANCH -eq " master" -or $env: APPVEYOR_REPO_BRANCH -match " ^release*" )
15+ {
16+ # generate change log including future version
17+ bundle exec github_changelog_generator -- token $env: GitHubToken -- future- release " v$env: GitVersion_MajorMinorPatch "
18+ }
19+ else
20+ {
21+ # generate change log
22+ # version includes commits
23+ bundle exec github_changelog_generator -- token $env: GitHubToken
24+ }
1425
1526 # updated changelog and the updated assembly info files
1627 git add CHANGELOG.md
Original file line number Diff line number Diff line change 11# Copyright (c) 2018 The nanoFramework project contributors
22# See LICENSE file in the project root for full license information.
33
4- # only need to update dependencies when build is NOT for a pull-request
5- if ($env: appveyor_pull_request_number )
4+ # only need to update dependencies when build is a tag
5+ if ($env: appveyor_pull_request_number -or $ env: APPVEYOR_REPO_TAG -eq " false " )
66{
7- ' Skip updating dependencies as this is a PR build...' | Write-Host - ForegroundColor White
7+ ' Skip updating dependencies as this is not a tag build...' | Write-Host - ForegroundColor White
88}
99else
1010{
1111 # update dependencies for class libraries that depend ONLY on mscorlib
1212
1313 # because it can take sometime for the package to become available on the NuGet providers
14- # need to hange here for 5 minutes (5 * 60 * 1000 )
14+ # need to hang here for 5 minutes (5 * 60)
1515 " Waiting 5 minutes to let package process flow in NuGet providers..." | Write-Host - ForegroundColor White
16- Start-Sleep - Milliseconds 300000
16+
17+ For ($i = 300 ; $i -gt 0 ; $i –- )
18+ {
19+ Write-Host " `r $i seconds remaining " - NoNewLine
20+ Start-Sleep - Seconds 1
21+ }
22+ Write-Host " `r "
1723
1824 $librariesToUpdate = (" lib-nanoFramework.Runtime.Events" ,
1925 " lib-nanoFramework.Runtime.Native" ,
You can’t perform that action at this time.
0 commit comments