Skip to content

Commit 343e220

Browse files
authored
Improve CI & CD (#47)
1 parent d6e5818 commit 343e220

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

commit-assemblyinfo-changes.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ else
1818

1919
'Updated assembly info...' | Write-Host -ForegroundColor White -NoNewline
2020
'OK' | Write-Host -ForegroundColor Green
21+
}
22+
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")
25+
{
26+
'Updating assembly version in nf-interpreter...' | Write-Host -ForegroundColor White -NoNewline
2127

2228
# clone nf-interpreter repo (only a shallow clone with last commit)
2329
git clone https://github.com/nanoframework/nf-interpreter -b develop --depth 1 -q
@@ -57,7 +63,7 @@ else
5763

5864
# commit changes
5965
git add -A 2>&1
60-
git commit -m"$commitMessage" -m"[version update]" -q
66+
git commit -m"$commitMessage [skip ci]" -m"[version update]" -q
6167
git push --set-upstream origin "$newBranch" --porcelain -q > $null
6268

6369
# start PR

generate-change-log.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
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 a pull-request or not a tag (master OR release)
25
if ($env:appveyor_pull_request_number -or
36
($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or

update-dependencies.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ else
169169
git push --set-upstream origin $newBranchName --porcelain -q
170170

171171
# start PR
172-
$prRequestBody = @{title="$prTitle";body="$commitMessage";head="$newBranchName";base="$env:APPVEYOR_REPO_BRANCH"} | ConvertTo-Json
172+
# we are hardcoding to develop branch to have a fixed one
173+
# this is very important for tags (which don't have branch information)
174+
# considering that the base branch can be changed at the PR ther is no big deal about this
175+
$prRequestBody = @{title="$prTitle";body="$commitMessage";head="$newBranchName";base="develop"} | ConvertTo-Json
173176
$githubApiEndpoint = "https://api.github.com/repos/nanoframework/$library/pulls"
174177
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
175178

0 commit comments

Comments
 (0)