Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Jan 16, 2025
1 parent 6d22650 commit 679f359
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/release.mts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ try {

const { stdout: versionListOut } = await $({
preferLocal: true
})`vsce show kokororin.vscode-phpfmt --json`;
})`vsce show ${pkg.publisher}.${pkg.name} --json`;
const versionList = JSON.parse(String(versionListOut));
const latestVersion = versionList.versions[0].version;

Expand All @@ -42,12 +42,9 @@ try {

consola.info(`Download url: ${pharUrl}`);

const tmpDir = path.join(os.tmpdir(), 'vscode-phpfmt');
await fs.mkdir(tmpDir, { recursive: true });

consola.info('Downloading vsix...');
const currentVsix = await got(
`https://kokororin.gallery.vsassets.io/_apis/public/gallery/publisher/kokororin/extension/vscode-phpfmt/${latestVersion}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage`
`https://${pkg.publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${pkg.publisher}/extension/${pkg.name}/${latestVersion}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage`
).buffer();

if (currentVsix.byteLength < 10000) {
Expand Down Expand Up @@ -127,7 +124,7 @@ ${changelogData}`;
owner: pkg.author,
repo: pkg.name,
tag_name: `v${newVersion}`,
body: `Please refer to [CHANGELOG.md](https://github.com/kokororin/vscode-phpfmt/blob/master/CHANGELOG.md) for details.`, // 可选的 release 描述
body: `Please refer to [CHANGELOG.md](https://github.com/${pkg.author}/${pkg.name}/blob/master/CHANGELOG.md) for details.`,
draft: false,
prerelease: false
});
Expand Down

0 comments on commit 679f359

Please sign in to comment.