Skip to content

Commit 6f1e92e

Browse files
committed
fix: fix error in VSIX Module for AppVeyor
1 parent eeeab04 commit 6f1e92e

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

src/Unchase.OData.ConnectedService.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1111
..\CHANGELOG.md = ..\CHANGELOG.md
1212
..\LICENSE.md = ..\LICENSE.md
1313
..\README.md = ..\README.md
14+
..\vsix.ps1 = ..\vsix.ps1
1415
EndProjectSection
1516
EndProject
1617
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{AF7BF915-39B1-44DB-860A-EF92B0FBD6AD}"

src/Unchase.OData.ConnectedService/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// You can specify all the values or you can default the Build and Revision Numbers
3131
// by using the '*' as shown below:
3232
// [assembly: AssemblyVersion("1.0.*")]
33-
[assembly: AssemblyVersion("1.4.2.0")]
34-
[assembly: AssemblyFileVersion("1.4.2.0")]
33+
[assembly: AssemblyVersion("1.4.3.0")]
34+
[assembly: AssemblyFileVersion("1.4.3.0")]
3535
[assembly: NeutralResourcesLanguage("en")]
3636

src/Unchase.OData.ConnectedService/Provider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Unchase.OData.ConnectedService
1717
internal class Provider : ConnectedServiceProvider
1818
{
1919
#region Constructors
20+
2021
public Provider()
2122
{
2223
Category = Constants.ExtensionCategory;
@@ -29,13 +30,14 @@ public Provider()
2930
BitmapSizeOptions.FromWidthAndHeight(64, 64)
3031
);
3132
CreatedBy = Constants.Author;
32-
Version = new Version(1, 3, 11, 0);
3333
Version = typeof(Provider).Assembly.GetName().Version;
3434
MoreInfoUri = new Uri(Constants.Website);
3535
}
36+
3637
#endregion
3738

3839
#region Methods
40+
3941
public override IEnumerable<Tuple<string, Uri>> GetSupportedTechnologyLinks()
4042
{
4143
yield return Tuple.Create("OData Website", new Uri("http://www.odata.org/"));
@@ -47,6 +49,7 @@ public override Task<ConnectedServiceConfigurator> CreateConfiguratorAsync(Conne
4749
var wizard = new Wizard(context);
4850
return Task.FromResult<ConnectedServiceConfigurator>(wizard);
4951
}
52+
5053
#endregion
5154
}
5255
}

src/Unchase.OData.ConnectedService/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" ?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="Unchase.OData.ConnectedService.afc46f39-8c64-4e14-85d0-af6c7c4291f3" Version="1.4.2" Language="en-US" Publisher="Unchase" />
4+
<Identity Id="Unchase.OData.ConnectedService.afc46f39-8c64-4e14-85d0-af6c7c4291f3" Version="1.4.3" Language="en-US" Publisher="Unchase" />
55
<DisplayName>Unchase OData Connected Service</DisplayName>
66
<Description xml:space="preserve">OData V1-V4 connected service with extension methods for client-side proxy class.</Description>
77
<MoreInfo>https://github.com/unchase/Unchase.Odata.Connectedservice</MoreInfo>

vsix.ps1

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[cmdletbinding()]
33
param()
44

5-
$vsixUploadEndpoint = "http://vsixgallery.com/api/upload"
5+
$vsixUploadEndpoint = "https://www.vsixgallery.com/api/upload"
66

77
function Vsix-PushArtifacts {
88
[cmdletbinding()]
@@ -15,7 +15,7 @@ function Vsix-PushArtifacts {
1515
process {
1616
foreach($filePath in $path) {
1717
$fileNames = (Get-ChildItem $filePath -Recurse)
18-
18+
1919
foreach($vsixFile in $fileNames)
2020
{
2121
if (Get-Command Update-AppveyorBuild -errorAction SilentlyContinue)
@@ -78,7 +78,8 @@ function Vsix-PublishToGallery{
7878
[byte[]]$bytes = [System.IO.File]::ReadAllBytes($vsixFile)
7979

8080
try {
81-
$response = Invoke-WebRequest $url -Method Post -Body $bytes -UseBasicParsing
81+
$webclient = New-Object System.Net.WebClient
82+
$webclient.UploadFile($url, $vsixFile) | Out-Null
8283
'OK' | Write-Host -ForegroundColor Green
8384
}
8485
catch{
@@ -240,7 +241,7 @@ function Vsix-TokenReplacement {
240241

241242
$content = [string]::join([environment]::newline, (get-content $FilePath))
242243
$regex = New-Object System.Text.RegularExpressions.Regex $searchString
243-
244+
244245
$regex.Replace($content, $replacement) | Out-File $FilePath
245246

246247
"OK" | Write-Host -ForegroundColor Green
@@ -257,7 +258,7 @@ function Vsix-CreateChocolatyPackage {
257258
[string]$packageId
258259
)
259260
process {
260-
261+
261262
if ([String]::IsNullOrEmpty($pacakgeId)){
262263
$error = New-Object System.ArgumentNullException "packageID is null or empty"
263264
}
@@ -307,8 +308,8 @@ function Vsix-CreateChocolatyPackage {
307308
$Icon = $vsixXml.SelectSingleNode("//ns:Tags", $ns).InnerText
308309
$PreviewImage = $vsixXml.SelectSingleNode("//ns:Tags", $ns).InnerText
309310
}
310-
311-
311+
312+
312313
[System.IO.DirectoryInfo]$folder = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), ".vsixbuild", "$id")
313314

314315
[System.IO.Directory]::CreateDirectory($folder.FullName) | Out-Null
@@ -333,6 +334,12 @@ function Vsix-CreateChocolatyPackage {
333334
$XmlWriter.WriteElementString("projectUrl", "http://vsixgallery.com/extension/" + $id + "/")
334335
$XmlWriter.WriteElementString("iconUrl", "http://vsixgallery.com/extensions/" + $id + "/icon.png")
335336
$XmlWriter.WriteElementString("packageSourceUrl", $repoUrl)
337+
$XmlWriter.WriteStartElement("dependencies")
338+
$XmlWriter.WriteStartElement("dependency")
339+
$XmlWriter.WriteAttributeString("id", "chocolatey-visualstudio.extension")
340+
$XmlWriter.WriteAttributeString("version", "1.6.0")
341+
$XmlWriter.WriteEndElement() # dependency
342+
$XmlWriter.WriteEndElement() # dependencies
336343
$XmlWriter.WriteEndElement() # metadata
337344

338345
$XmlWriter.WriteStartElement("files")
@@ -353,9 +360,9 @@ function Vsix-CreateChocolatyPackage {
353360
$sb.AppendLine("`$url = `'" + "https://vsixgallery.azurewebsites.net/extensions/" + $id + "/" + $displayName + ".vsix`'") | Out-Null
354361
$sb.AppendLine("`$checksum = `'" + $hash + "`'") | Out-Null
355362
$sb.AppendLine("`$checksumType = `'SHA256`'") | Out-Null
356-
$sb.AppendLine("Install-ChocolateyVsixPackage `$name `$url -Checksum `$checksum -ChecksumType `$checksumType") | Out-Null
363+
$sb.AppendLine("Install-VisualStudioVsixExtension `$name `$url -Checksum `$checksum -ChecksumType `$checksumType") | Out-Null
364+
357365

358-
359366
New-Item ($folder.FullName + "\chocolateyInstall.ps1") -type file -force -value $sb.ToString() | Out-Null
360367

361368
Push-Location $folder.FullName
@@ -378,4 +385,4 @@ function Vsix-CreateChocolatyPackage {
378385
}
379386
}
380387
}
381-
}
388+
}

0 commit comments

Comments
 (0)