Skip to content

Commit ea0a3fd

Browse files
authored
Work on CD/CI [skip ci] (#17)
1 parent 803a0ca commit ea0a3fd

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

commit-assemblyinfo-changes.ps1

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# Copyright (c) 2018 The nanoFramework project contributors
22
# See LICENSE file in the project root for full license information.
33

4-
# skip updating assembly info changes if build is a pull-request or not a tag (master OR release)
5-
if ($env:appveyor_pull_request_number -or
6-
($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
7-
($env:APPVEYOR_REPO_BRANCH -match "^release*" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
8-
$env:APPVEYOR_REPO_TAG -eq "true")
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")
96
{
107
'Skip committing assembly info changes...' | Write-Host -ForegroundColor White
118
}
@@ -20,14 +17,14 @@ else
2017
'OK' | Write-Host -ForegroundColor Green
2118
}
2219

23-
# update assembly info in nf-interpreter if we are in development branch or if this is tag (master OR release)
24-
if ($env:APPVEYOR_REPO_BRANCH -match "^dev*" -or $env:APPVEYOR_REPO_TAG -eq "true")
20+
# update assembly info in nf-interpreter if this is tag
21+
if ($env:APPVEYOR_REPO_TAG -eq "true")
2522
{
2623
'Updating assembly version in nf-interpreter...' | Write-Host -ForegroundColor White -NoNewline
2724

2825
# clone nf-interpreter repo (only a shallow clone with last commit)
2926
git clone https://github.com/nanoframework/nf-interpreter -b develop --depth 1 -q
30-
cd nf-interpreter
27+
cd nf-interpreter > $null
3128

3229
# new branch name
3330
$newBranch = "$env:APPVEYOR_REPO_BRANCH-nfbot/update-version/nanoFramework.Networking.Sntp/$env:GitVersion_NuGetVersionV2"

generate-change-log.ps1

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
# Copyright (c) 2018 The nanoFramework project contributors
22
# See LICENSE file in the project root for full license information.
33

4-
# generate change log when build is NOT for a pull-request
5-
# generate change log when build is NOT a pull-request or not a tag (master OR release)
6-
if ($env:appveyor_pull_request_number -or
7-
($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
8-
($env:APPVEYOR_REPO_BRANCH -match "^release*" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
9-
$env:APPVEYOR_REPO_TAG -eq "true")
4+
# skip generating the change log when 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")
106
{
117
'Skip change log processing...' | Write-Host -ForegroundColor White
128
}
139
else
1410
{
1511
# need this to keep ruby happy
16-
md c:\tmp
12+
md c:\tmp > $null
1713

1814
if ($env:APPVEYOR_REPO_BRANCH -eq "master" -or $env:APPVEYOR_REPO_BRANCH -match "^release*")
1915
{

0 commit comments

Comments
 (0)