From 2b7d35efb45cecf43ffaf4e8e6db9b5ce80b29e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=9D=E3=82=89?= Date: Thu, 25 Apr 2024 21:35:42 +0800 Subject: [PATCH] fix: build --- .github/workflows/release.yml | 6 +++--- scripts/release.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5115db..d228d96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,11 @@ name: Release on: - # schedule: - # - cron: "*/30 * * * *" + schedule: + - cron: "*/30 * * * *" push: branches: - - master-null + - master jobs: release: diff --git a/scripts/release.ts b/scripts/release.ts index 4acfe4f..756bd5b 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -51,9 +51,13 @@ void (async () => { const zip = new AdmZip(currentVsixPath); const zipEntries = zip.getEntries(); const entry = zipEntries.find( - o => - o.entryName === `extension/node_modules/phpfmt/v2/${phpfmt.v2.pharName}` + o => o.entryName === `extension/dist/${phpfmt.v2.pharName}` ); + + if (entry == null) { + throw new Error("Can't find phar in vsix"); + } + const currentPharData = String(entry?.getData()); const currentMd5 = md5(currentPharData); console.log(`Current md5: ${currentMd5}`);