@@ -43,7 +43,7 @@ dotnet remove VisualStudio.Extension-2019/VisualStudio.Extension-vs2019.csproj p
43
43
dotnet add VisualStudio.Extension- 2019 / VisualStudio.Extension- vs2019.csproj package nanoFramework.Tools.Debugger.Net -- version $packageTargetVersion -- no- restore
44
44
dotnet remove VisualStudio.Extension- 2022 / VisualStudio.Extension- vs2022.csproj package nanoFramework.Tools.Debugger.Net
45
45
dotnet add VisualStudio.Extension- 2022 / VisualStudio.Extension- vs2022.csproj package nanoFramework.Tools.Debugger.Net -- version $packageTargetVersion -- no- restore
46
- dotnet restore -- force - evaluate
46
+ nuget restore - uselockfile
47
47
48
48
" Bumping nanoFramework.Tools.Debugger to v$packageTargetVersion ." | Write-Host - ForegroundColor Cyan
49
49
@@ -120,110 +120,6 @@ else
120
120
Write-Host " Nothing to udpate at VS extension."
121
121
}
122
122
123
- # ######################
124
- # nanoFrameworkDeployer
125
-
126
- " **************************************************************************************" | Write-Host
127
- " Updating nanoFramework.Tools.Debugger.Net package in nanoFrameworkDeployer solution..." | Write-Host
128
-
129
- Set-Location " $env: Agent_TempDirectory " | Out-Null
130
-
131
- # clone repo and checkout main branch
132
- Write-Debug " Init and featch nf-Deployer repo"
133
-
134
- git clone -- depth 1 https:// github.com / nanoframework/ nanoFrameworkDeployer nanoFrameworkDeployer
135
- Set-Location nanoFrameworkDeployer | Out-Null
136
- git config -- global gc.auto 0
137
- git config -- global user.name nfbot
138
- git config -- global user.email nanoframework@outlook.com
139
- git config -- global core.autocrlf true
140
-
141
- Write-Host " Checkout main branch..."
142
- git checkout -- quiet main | Out-Null
143
-
144
- dotnet restore
145
- dotnet remove nanoFrameworkDeployer/ nanoFrameworkDeployer.csproj package nanoFramework.Tools.Debugger.Net
146
- dotnet add nanoFrameworkDeployer/ nanoFrameworkDeployer.csproj package nanoFramework.Tools.Debugger.Net -- version $packageTargetVersion -- no- restore
147
- nuget restore - ForceEvaluate
148
-
149
- " Bumping nanoFramework.Tools.Debugger to v$packageTargetVersion ." | Write-Host - ForegroundColor Cyan
150
-
151
- # build commit message
152
- $commitMessage = " Bumps nanoFramework.Tools.Debugger to v$packageTargetVersion .`n "
153
- # build PR title
154
- $prTitle = " Bumps nanoFramework.Tools.Debugger to v$packageTargetVersion "
155
-
156
- # need this line so nfbot flags the PR appropriately
157
- $commitMessage += " `n [version update]`n`n "
158
-
159
- # add this to cascade updates
160
- $commitMessage += " `n`n ***UPDATE_DEPENDENTS***`n`n "
161
-
162
- # better add this warning line
163
- $commitMessage += " ### :warning: This is an automated update. Merge only after all tests pass. :warning:`n "
164
-
165
- Write-Debug " Git branch"
166
-
167
- # create branch to perform updates
168
- git branch $newBranchName
169
-
170
- Write-Debug " Checkout branch"
171
-
172
- # checkout branch
173
- git checkout $newBranchName
174
-
175
- # check if anything was changed
176
- $repoStatus = " $ ( git status -- short -- porcelain) "
177
-
178
- if ($repoStatus -ne " " )
179
- {
180
- Write-Debug " Add changes"
181
-
182
- # commit changes
183
- git add - A > $null
184
-
185
- Write-Debug " Commit changed files"
186
-
187
- git commit - m " $prTitle ***NO_CI***" - m " $commitMessage " > $null
188
-
189
- Write-Debug " Push changes"
190
-
191
- git - c http.extraheader= " AUTHORIZATION: $auth " push -- set-upstream origin $newBranchName > $null
192
-
193
- # start PR
194
- # we are hardcoding to 'main' branch to have a fixed one
195
- # this is very important for tags (which don't have branch information)
196
- # considering that the base branch can be changed at the PR ther is no big deal about this
197
- $prRequestBody = @ {title = " $prTitle " ;body = " $commitMessage " ;head = " $newBranchName " ;base = " main" } | ConvertTo-Json
198
- $githubApiEndpoint = " https://api.github.com/repos/nanoframework/nanoFrameworkDeployer/pulls"
199
- [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12
200
-
201
- $headers = @ {}
202
- $headers.Add (" Authorization" , " $auth " )
203
- $headers.Add (" Accept" , " application/vnd.github.symmetra-preview+json" )
204
-
205
- try
206
- {
207
- $result = Invoke-RestMethod - Method Post - UserAgent [Microsoft.PowerShell.Commands.PSUserAgent ]::InternetExplorer - Uri $githubApiEndpoint - Header $headers - ContentType " application/json" - Body $prRequestBody
208
- ' Started PR with dependencies update...' | Write-Host - NoNewline
209
- ' OK' | Write-Host - ForegroundColor Green
210
- }
211
- catch
212
- {
213
- $result = $_.Exception.Response.GetResponseStream ()
214
- $reader = New-Object System.IO.StreamReader($result )
215
- $reader.BaseStream.Position = 0
216
- $reader.DiscardBufferedData ()
217
- $responseBody = $reader.ReadToEnd ();
218
-
219
- throw " Error starting PR: $responseBody "
220
- }
221
- }
222
- else
223
- {
224
- Write-Host " Nothing to udpate at nanoFramework Deployer."
225
- }
226
-
227
123
# ######################
228
124
# nano firmware flasher
229
125
@@ -250,7 +146,7 @@ dotnet remove nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj pac
250
146
dotnet add nanoFirmwareFlasher.Library/ nanoFirmwareFlasher.Library.csproj package nanoFramework.Tools.Debugger.Net -- version $packageTargetVersion -- no- restore
251
147
dotnet remove nanoFirmwareFlasher.Tool/ nanoFirmwareFlasher.Tool.csproj package nanoFramework.Tools.Debugger.Net
252
148
dotnet add nanoFirmwareFlasher.Tool/ nanoFirmwareFlasher.Tool.csproj package nanoFramework.Tools.Debugger.Net -- version $packageTargetVersion -- no- restore
253
- dotnet restore -- force - evaluate
149
+ nuget restore - uselockfile
254
150
255
151
" Bumping nanoFramework.Tools.Debugger to v$packageTargetVersion ." | Write-Host - ForegroundColor Cyan
256
152
0 commit comments