Skip to content

Commit

Permalink
fix release warning (#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemmiillyy authored Apr 30, 2024
1 parent abfe79f commit 56d5eb9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scripts/release-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function main() {
execFile('rm', ['-rf', `${PATH_TO_CLI}/npm-shrinkwrap.json`]);
execFile('touch', [`${PATH_TO_CLI}/npm-shrinkwrap.json`]);

await oclifPack({ os: operatingSystem });
await exec(`pnpm oclif pack ${operatingSystem}`);

const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN
Expand All @@ -114,7 +114,7 @@ async function main() {

// Pack windows on linux
if (operatingSystem === 'deb') {
await oclifPack({ os: 'win' });
await exec(`pnpm oclif pack win`);
// Windows packs files under "win32" directory
const pathToAssetWindows = `${PATH_TO_CLI}/dist/win32`;
const files = fs.readdirSync(pathToAssetWindows);
Expand All @@ -129,14 +129,6 @@ async function main() {
}
}

const oclifPack = async ({ os }: { os: 'win' | 'macos' | 'deb' }) => {
const pack = await exec(`pnpm oclif pack ${os}`);
if (pack.stderr) {
throw new Error(`Failed to pack: ${pack.stderr}`);
}
console.log('Successfully packed CLI', pack.stdout);
};

const uploadFiles = async ({
pathToFile,
fileName,
Expand Down

0 comments on commit 56d5eb9

Please sign in to comment.