Skip to content

Commit

Permalink
Work around long plugin installation
Browse files Browse the repository at this point in the history
- Target all branches
- Remove admin parameter
  • Loading branch information
gbakeman committed Jan 17, 2025
1 parent 7959f5e commit aa781cf
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 18 deletions.
57 changes: 57 additions & 0 deletions .github/actions/test-vsix-installer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Install a Visual Studio Extension'
description: 'Download the latest extension version and install in Visual Studio'
inputs:
packagename:
description: 'Package names from the Visual Studio Marketplace URL itemName parameter'
required: true
default: ''
runs:
using: "composite"
steps:
- id: alt-dl
shell: pwsh
run: curl -o mat.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/dts-publisher/vsextensions/mat2022/4.2.1/vspackage
- id: vsix
shell: pwsh
run: |
$baseProtocol = "https:"
$baseHostName = "marketplace.visualstudio.com"
$Uri = "$($baseProtocol)//$($baseHostName)/items?itemName=${{ inputs.packagename }}"
$VsixLocation = "$($env:Temp)\$([guid]::NewGuid()).vsix"
$VSInstallDir = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service"
if (-Not $VSInstallDir) {
Write-Error "Visual Studio install directory is missing"
Exit 1
}
Write-Host "Grabbing VSIX extension at $($Uri)"
$HTML = Invoke-WebRequest -Uri $Uri -UseBasicParsing -SessionVariable session
Write-Host "Attempting to download ${{ inputs.packagename }}..."
$anchor = $HTML.Links |
Where-Object { $_.class -eq 'install-button-container' } |
Select-Object -ExpandProperty href
if (-Not $anchor) {
Write-Error "Could not find download anchor tag on the Visual Studio Extensions page"
Exit 1
}
Write-Host "Anchor is $($anchor)"
$href = "$($baseProtocol)//$($baseHostName)$($anchor)"
Write-Host "Href is $($href)"
Invoke-WebRequest $href -OutFile $VsixLocation -WebSession $session
if (-Not (Test-Path $VsixLocation)) {
Write-Error "Downloaded VSIX file could not be located"
Exit 1
}
Write-Host "VSInstallDir is $($VSInstallDir)"
Write-Host "VsixLocation is $($VsixLocation)"
Write-Host "Installing ${{ inputs.packagename }}..."
$FilePath = Join-Path $env:GITHUB_WORKSPACE "mat.vsix"
Start-Process -Filepath "$($VSInstallDir)\VSIXInstaller" -WorkingDirectory $env:ProgramFiles -ArgumentList "/q $($FilePath)" -Wait -PassThru
Write-Host "Cleanup..."
rm $VsixLocation
Write-Host "Installation of ${{ inputs.packagename }} complete!"
3 changes: 1 addition & 2 deletions .github/workflows/build-translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_dispatch:

pull_request:
branches: Dev-2.2
paths:
- "**.xlf"

Expand All @@ -15,7 +14,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Multilingual App Toolkit extension
uses: microcompiler/install-vsix@db1f973c3d24d1ddc0c38f14d0e1e3a85b2ccb21
uses: ./.github/actions/test-vsix-installer
with:
packagename: 'dts-publisher.mat2022'
- name: Build solution in Debug configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1887,15 +1887,15 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa
<target state="new">Unavailable</target>
<note from="MultilingualBuild" annotates="source" priority="2">Indicate that a variable is unavailable</note>
</trans-unit>
<trans-unit id="RepeatHS" translate="yes" xml:space="preserve" extype="System.Resources.ResXFileRef, System.Windows.Forms">
<trans-unit id="RepeatHS" translate="yes" extype="System.Resources.ResXFileRef, System.Windows.Forms" xml:space="preserve">
<source>..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</source>
<target state="needs-review-translation">..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</target>
</trans-unit>
<trans-unit id="disconnect2" translate="yes" xml:space="preserve" extype="System.Resources.ResXFileRef, System.Windows.Forms">
<trans-unit id="disconnect2" translate="yes" extype="System.Resources.ResXFileRef, System.Windows.Forms" xml:space="preserve">
<source>..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</source>
<target state="needs-review-translation">..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</target>
</trans-unit>
<trans-unit id="internetconnection" translate="yes" xml:space="preserve" extype="System.Resources.ResXFileRef, System.Windows.Forms">
<trans-unit id="internetconnection" translate="yes" extype="System.Resources.ResXFileRef, System.Windows.Forms" xml:space="preserve">
<source>..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</source>
<target state="needs-review-translation">..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</target>
</trans-unit>
Expand Down Expand Up @@ -3185,59 +3185,59 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa
<source></source>
<target state="new"></target>
</trans-unit>
<trans-unit id="Menu_Connect.Size" translate="yes" xml:space="preserve" extype="System.Drawing.Size, System.Drawing">
<trans-unit id="Menu_Connect.Size" translate="yes" extype="System.Drawing.Size, System.Drawing" xml:space="preserve">
<source>180, 22</source>
<target state="needs-review-translation">180, 22</target>
</trans-unit>
<trans-unit id="Menu_Connect.Text" translate="yes" xml:space="preserve">
<source>Connect</source>
<target state="new">Connect</target>
</trans-unit>
<trans-unit id="AG_InV.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_InV.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="AG_OutV.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_OutV.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="AG_BattCh.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_BattCh.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="AG_Load.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_Load.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="AG_BattV.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_BattV.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="AG_InF.Text" translate="yes" xml:space="preserve" extype="System.Resources.ResXNullRef, System.Windows.Forms">
<trans-unit id="AG_InF.Text" translate="yes" extype="System.Resources.ResXNullRef, System.Windows.Forms" xml:space="preserve">
<source></source>
<target state="needs-review-translation"></target>
</trans-unit>
<trans-unit id="ToolStripSeparator1.Size" translate="yes" xml:space="preserve" extype="System.Drawing.Size, System.Drawing">
<trans-unit id="ToolStripSeparator1.Size" translate="yes" extype="System.Drawing.Size, System.Drawing" xml:space="preserve">
<source>177, 6</source>
<target state="needs-review-translation">177, 6</target>
</trans-unit>
<trans-unit id="Menu_Persist.Size" translate="yes" xml:space="preserve" extype="System.Drawing.Size, System.Drawing">
<trans-unit id="Menu_Persist.Size" translate="yes" extype="System.Drawing.Size, System.Drawing" xml:space="preserve">
<source>180, 22</source>
<target state="needs-review-translation">180, 22</target>
</trans-unit>
<trans-unit id="Menu_Persist.Text" translate="yes" xml:space="preserve">
<source>Persist</source>
<target state="new">Persist</target>
</trans-unit>
<trans-unit id="Menu_Disconnect.Enabled" translate="yes" xml:space="preserve" extype="System.Boolean, mscorlib">
<trans-unit id="Menu_Disconnect.Enabled" translate="yes" extype="System.Boolean, mscorlib" xml:space="preserve">
<source>False</source>
<target state="needs-review-translation">False</target>
</trans-unit>
<trans-unit id="$this.ImeMode" translate="yes" xml:space="preserve" extype="System.Windows.Forms.ImeMode, System.Windows.Forms">
<trans-unit id="$this.ImeMode" translate="yes" extype="System.Windows.Forms.ImeMode, System.Windows.Forms" xml:space="preserve">
<source>NoControl</source>
<target state="needs-review-translation">NoControl</target>
</trans-unit>
<trans-unit id="Menu_UPS_Var.Enabled" translate="yes" xml:space="preserve" extype="System.Boolean, mscorlib">
<trans-unit id="Menu_UPS_Var.Enabled" translate="yes" extype="System.Boolean, mscorlib" xml:space="preserve">
<source>False</source>
<target state="needs-review-translation">False</target>
</trans-unit>
Expand Down Expand Up @@ -4171,7 +4171,7 @@ Remaining Time : {WinNUT.Lbl_VRTime.Text}</source>
</trans-unit>
<trans-unit id="$this.ImeMode" translate="yes" extype="System.Windows.Forms.ImeMode, System.Windows.Forms" xml:space="preserve">
<source>NoControl</source>
<target state="needs-review-translation">NoControl</target>
<target state="translated">NoControl3</target>
</trans-unit>
</group>
</body>
Expand Down

0 comments on commit aa781cf

Please sign in to comment.