Skip to content

Commit

Permalink
finally automate upload to avoid horrible VS extension website
Browse files Browse the repository at this point in the history
  • Loading branch information
belav committed Nov 1, 2024
1 parent f2b2b98 commit 9475d2f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 8 deletions.
24 changes: 24 additions & 0 deletions Shell/PublishVS.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function CSH-PublishVS {
param (
[Parameter(Mandatory=$true)]
[string]$accessToken
)

$repositoryRoot = Join-Path $PSScriptRoot ".."
$vsRoot = Join-Path $repositoryRoot "/Src/CSharpier.VisualStudio"

$vsixPath = "C:\Program Files\Microsoft Visual Studio\2022\Professional\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe"

& $vsixPath publish `
-payload $vsRoot/CSharpier.VisualStudio/bin/Release/CSharpier.VisualStudio.vsix `
-publishManifest $vsRoot/manifest.json `
-personalAccessToken $accessToken

& $vsixPath publish `
-payload $vsRoot/CSharpier.VisualStudio2019/bin/Release/CSharpier.VisualStudio2019.vsix `
-publishManifest $vsRoot/manifest2019.json `
-personalAccessToken $accessToken

}

Export-ModuleMember -Function CSH-*
8 changes: 5 additions & 3 deletions Src/CSharpier.VisualStudio/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Publishing
- Update version in BOTH files at CSharpier.VisualStudio[2019]/source.extension.vsixmanifest
- Update ChangeLog.md
- build solution in release (can this happen via command line?)
- go to https://marketplace.visualstudio.com/manage/publishers/csharpier (with personal microsoft account)
- three dots - edit - add new vsix
- Automate this if we release a lot
- use cli
- CSH-PublishVS [AccessToken]
- old way
- go to https://marketplace.visualstudio.com/manage/publishers/csharpier (with personal microsoft account)
- three dots - edit - add new vsix
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<MoreInfo>https://github.com/belav/csharpier</MoreInfo>
<License>LICENSE</License>
<Icon>logo.png</Icon>
<Tags>Format, Formatting, LineEnd, Tab, Space, CSharpier, Prettier</Tags>
<Tags>CSharpier;Formatting;Prettier;C#;Code;Format;Formatter;Formatting</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,)">
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,)">
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>arm64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,18.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MoreInfo>https://github.com/belav/csharpier</MoreInfo>
<License>LICENSE</License>
<Icon>logo.png</Icon>
<Tags>Format, Formatting, LineEnd, Tab, Space, CSharpier, Prettier</Tags>
<Tags>CSharpier;Formatting;Prettier;C#;Code;Format;Formatter;Formatting</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" />
Expand Down
15 changes: 15 additions & 0 deletions Src/CSharpier.VisualStudio/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "http://json.schemastore.org/vsix-publish",
"categories": [
"coding"
],
"identity": {
"internalName": "CSharpier"
},
"overview": "README.md",
"priceCategory": "free",
"publisher": "csharpier",
"private": false,
"qna": true,
"repo": "https://github.com/belav/csharpier"
}
15 changes: 15 additions & 0 deletions Src/CSharpier.VisualStudio/manifest2019.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "http://json.schemastore.org/vsix-publish",
"categories": [
"coding"
],
"identity": {
"internalName": "CSharpier2019"
},
"overview": "README.md",
"priceCategory": "free",
"publisher": "csharpier",
"private": false,
"qna": true,
"repo": "https://github.com/belav/csharpier"
}

0 comments on commit 9475d2f

Please sign in to comment.