Skip to content

Commit 9a5d804

Browse files
authored
Merge pull request #1332 from microsoft/dev/andarno/libtemplateUpdate
Merge latest Library.Template
2 parents 1c98466 + 562506f commit 9a5d804

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.305",
3+
"version": "9.0.306",
44
"rollForward": "patch",
55
"allowPrerelease": false
66
},

tools/variables/InsertJsonValues.ps1

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,25 @@ $BasePath = "$PSScriptRoot\..\..\bin\Packages\$BuildConfiguration\Vsix"
88

99
if (Test-Path $BasePath) {
1010
$vsmanFiles = @()
11-
Get-ChildItem $BasePath *.vsman -Recurse -File |% {
11+
Get-ChildItem $BasePath *.vsman -Recurse -File | % {
1212
$version = (Get-Content $_.FullName | ConvertFrom-Json).info.buildVersion
13+
$fullPath = (Resolve-Path $_.FullName).Path
14+
$basePath = (Resolve-Path $BasePath).Path
15+
# Cannot use RelativePath or GetRelativePath due to Powershell Core v2.0 limitation
16+
if ($fullPath.StartsWith($basePath, [StringComparison]::OrdinalIgnoreCase)) {
17+
# Get the relative paths then make sure the directory separators match URL format.
18+
$rfn = $fullPath.Substring($basePath.Length).TrimStart('\', '/').Replace('\', '/')
19+
}
20+
else {
21+
$rfn = $fullPath # fallback to full path if it doesn't start with base path
22+
}
23+
1324
$fn = $_.Name
14-
$vsmanFiles += "$fn{$version}=https://vsdrop.corp.microsoft.com/file/v1/$vstsDropNames;$fn"
25+
26+
# The left side is filename followed by the version and the right side is the drop url and the relative filename
27+
$thisVsManFile = "$fn{$version}=https://vsdrop.corp.microsoft.com/file/v1/$vstsDropNames;$rfn"
28+
$vsmanFiles += $thisVsManFile
1529
}
1630

17-
[string]::join(',',$vsmanFiles)
31+
[string]::join(',', $vsmanFiles)
1832
}

0 commit comments

Comments
 (0)