From d59bfa4e610aa471319b61f9683a208318c1a097 Mon Sep 17 00:00:00 2001 From: James Pogran Date: Tue, 25 Jan 2022 08:38:08 -0500 Subject: [PATCH] feedback --- .github/workflows/preview.yml | 46 +++++++++++++++++----------------- .github/workflows/publish.yml | 47 +++++++++++++++++------------------ build/downloader.ts | 6 ++--- 3 files changed, 49 insertions(+), 50 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index d69631d99d..453797a746 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -11,47 +11,47 @@ jobs: strategy: matrix: include: - - os: windows-latest + - vsce_target: win32-x64 + ls_target: windows_amd64 platform: win32 arch: x64 npm_config_arch: x64 - target: win32-x64 - - os: windows-latest + - vsce_target: win32-ia32 + ls_target: windows_386 platform: win32 arch: ia32 npm_config_arch: ia32 - target: win32-ia32 - # - os: windows-latest - # platform: win32 - # arch: arm64 - # npm_config_arch: arm - # target: win32-arm64 - - os: ubuntu-latest + - vsce_target: win32-arm64 + ls_target: windows_arm64 + platform: win32 + arch: arm64 + npm_config_arch: arm + - vsce_target: linux-x64 + ls_target: linux_amd64 platform: linux arch: x64 npm_config_arch: x64 - target: linux-x64 - - os: ubuntu-latest + - vsce_target: linux-arm64 + ls_target: linux_arm64 platform: linux arch: arm64 npm_config_arch: arm64 - target: linux-arm64 - - os: ubuntu-latest + - vsce_target: linux-armhf + ls_target: linux_arm platform: linux arch: armhf npm_config_arch: arm - target: linux-armhf - - os: macos-latest + - vsce_target: darwin-x64 + ls_target: darwin_amd64 platform: darwin arch: x64 npm_config_arch: x64 - target: darwin-x64 - - os: macos-latest + - vsce_target: darwin-arm64 + ls_target: darwin_arm64 platform: darwin arch: arm64 npm_config_arch: arm64 - target: darwin-arm64 - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" steps: - name: Check out repository uses: actions/checkout@v2 @@ -66,13 +66,13 @@ jobs: id: set-preview run: npm run preview - name: Package VSIX - run: npm run package -- --target=${{ matrix.target }} + run: npm run package -- --target=${{ matrix.vsce_target }} env: - target: ${{ matrix.target }} + ls_target: ${{ matrix.ls_target }} - name: Upload vsix as artifact uses: actions/upload-artifact@v2 with: - name: ${{ matrix.target }} + name: ${{ matrix.vsce_target }} path: "*.vsix" - name: Check latest published version shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fe446f9591..b37310f210 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,53 +11,52 @@ jobs: strategy: matrix: include: - - os: windows-latest + - vsce_target: win32-x64 + ls_target: windows_amd64 platform: win32 arch: x64 npm_config_arch: x64 - target: win32-x64 - - os: windows-latest + - vsce_target: win32-ia32 + ls_target: windows_386 platform: win32 arch: ia32 npm_config_arch: ia32 - target: win32-ia32 - # - os: windows-latest - # platform: win32 - # arch: arm64 - # npm_config_arch: arm - # target: win32-arm64 - - os: ubuntu-latest + - vsce_target: win32-arm64 + ls_target: windows_arm64 + platform: win32 + arch: arm64 + npm_config_arch: arm + - vsce_target: linux-x64 + ls_target: linux_amd64 platform: linux arch: x64 npm_config_arch: x64 - target: linux-x64 - - os: ubuntu-latest + - vsce_target: linux-arm64 + ls_target: linux_arm64 platform: linux arch: arm64 npm_config_arch: arm64 - target: linux-arm64 - - os: ubuntu-latest + - vsce_target: linux-armhf + ls_target: linux_arm platform: linux arch: armhf npm_config_arch: arm - target: linux-armhf - - os: macos-latest + - vsce_target: darwin-x64 + ls_target: darwin_amd64 platform: darwin arch: x64 npm_config_arch: x64 - target: darwin-x64 - - os: macos-latest + - vsce_target: darwin-arm64 + ls_target: darwin_arm64 platform: darwin arch: arm64 npm_config_arch: arm64 - target: darwin-arm64 - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" steps: - name: Check out repository uses: actions/checkout@v2 - name: Read extension version id: ext-version - shell: bash run: | content=`cat ./package.json | jq -r .version` echo "::set-output name=content::$content" @@ -76,13 +75,13 @@ jobs: env: npm_config_arch: ${{ matrix.npm_config_arch }} - name: Package VSIX - run: npm run package -- --target=${{ matrix.target }} + run: npm run package -- --target=${{ matrix.vsce_target }} env: - target: ${{ matrix.target }} + ls_target: ${{ matrix.ls_target }} - name: Upload vsix as artifact uses: actions/upload-artifact@v2 with: - name: ${{ matrix.target }} + name: ${{ matrix.vsce_target }} path: "*.vsix" publish: diff --git a/build/downloader.ts b/build/downloader.ts index c4697058b3..c5f4543f94 100644 --- a/build/downloader.ts +++ b/build/downloader.ts @@ -73,7 +73,7 @@ async function run(platform: string, architecture: string) { const build = release.getBuild(os, arch); if (!build) { - throw new Error(`Install error: no matching terraform-ls binary for ${os}/${arch}`); + throw new Error(`Install error: no matching terraform-ls binary for ${os}/${arch}`); } console.log(build); @@ -91,8 +91,8 @@ async function run(platform: string, architecture: string) { let os = process.platform.toString(); let arch = process.arch; -// ls_target=linux-x64 npm run package -- --target=linux-x64 -const lsTarget = process.env.target; +// ls_target=linux_amd64 npm run package -- --target=linux-x64 +const lsTarget = process.env.ls_target; if (lsTarget !== undefined) { const tgt = lsTarget.split('-'); os = tgt[0];