Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI & CD #47

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion commit-assemblyinfo-changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ else

'Updated assembly info...' | Write-Host -ForegroundColor White -NoNewline
'OK' | Write-Host -ForegroundColor Green
}

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

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

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

# start PR
Expand Down
3 changes: 3 additions & 0 deletions generate-change-log.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2018 The nanoFramework project contributors
# See LICENSE file in the project root for full license information.

# generate change log when build is NOT a pull-request or not a tag (master OR release)
if ($env:appveyor_pull_request_number -or
($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq 'true') -or
Expand Down
5 changes: 4 additions & 1 deletion update-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ else
git push --set-upstream origin $newBranchName --porcelain -q

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

Expand Down