Skip to content

Commit 43b69f6

Browse files
committed
Work CI-CD
- Fix condition to update dependents. (now updates on build of main branch) - Improve task descriptions for clarity. - Fix auth computing in update dependents PS1. ***NO_CI***
1 parent eb003fb commit 43b69f6

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ jobs:
407407
eq(variables['System.PullRequest.PullRequestId'], ''),
408408
eq(variables['UPDATE_DEPENDENTS'], 'false')
409409
)
410-
displayName: Push nanoff NuGet package to NuGet
410+
displayName: Push nanoff dotnet tool to NuGet
411411
continueOnError: true
412412
inputs:
413413
command: push
@@ -425,7 +425,7 @@ jobs:
425425
eq(variables['System.PullRequest.PullRequestId'], ''),
426426
eq(variables['UPDATE_DEPENDENTS'], 'false')
427427
)
428-
displayName: Push library NuGet package to NuGet
428+
displayName: Push NuGet package with library to NuGet
429429
continueOnError: true
430430
inputs:
431431
command: push
@@ -454,6 +454,7 @@ jobs:
454454
action: create
455455
isDraft: false
456456
addChangeLog: true
457+
changeLogType: issueBased
457458
changeLogLabels: |
458459
[
459460
{ "label" : "Type: bug", "displayName" : "Bugs fixed", "state" : "closed" },
@@ -467,6 +468,7 @@ jobs:
467468
- task: PowerShell@2
468469
condition: >-
469470
or(
471+
eq(variables['System.PullRequest.PullRequestId'], ''),
470472
eq(variables['UPDATE_DEPENDENTS'], 'true'),
471473
eq(variables['run_update_dependents'], 'true')
472474
)

azure-pipelines/update-dependents.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
44
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
5-
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$env:GH_TOKEN"))))"
5+
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$env:GH_TOKEN")))"
66

77
# init/reset these
88
$commitMessage = ""
@@ -55,21 +55,21 @@ $commitMessage += "`n[version update]`n`n"
5555
# better add this warning line
5656
$commitMessage += "### :warning: This is an automated update. Merge only after all tests pass. :warning:`n"
5757

58-
Write-Debug "Git branch"
59-
60-
# create branch to perform updates
61-
git branch $newBranchName
62-
63-
Write-Debug "Checkout branch"
64-
65-
# checkout branch
66-
git checkout $newBranchName
67-
6858
# check if anything was changed
6959
$repoStatus = "$(git status --short --porcelain)"
7060

7161
if ($repoStatus -ne "")
7262
{
63+
Write-Debug "Git branch"
64+
65+
# create branch to perform updates
66+
git branch $newBranchName
67+
68+
Write-Debug "Checkout branch"
69+
70+
# checkout branch
71+
git checkout $newBranchName
72+
7373
Write-Debug "Add changes"
7474

7575
# commit changes
@@ -114,5 +114,5 @@ if ($repoStatus -ne "")
114114
}
115115
else
116116
{
117-
Write-Host "Nothing udpate at nanoFramework.Tools.FirmwareFlasher."
117+
Write-Host "Nothing udpate at $repoName."
118118
}

0 commit comments

Comments
 (0)