Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eemmiillyy committed Jul 17, 2024
1 parent 326db88 commit 44aa875
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions scripts/release-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ async function main() {

// Tarballs
await exec(`pnpm oclif pack tarballs --targets=${platformDistributions(platform)}`);
await uploadS3(platform);

//Packages
await exec(`pnpm oclif pack ${platform}`);
// Upload Tarballs
await uploadS3(platform);
// Upload packages
await uploadS3(platform, { pkg: true });
await promoteS3(platform, version);
// const octokit = new Octokit({
Expand All @@ -117,15 +118,16 @@ async function main() {

// Pack windows on linux
if (operatingSystem === 'deb') {
const platform = 'win';
// Tarballs
await exec(`pnpm oclif pack win --targets=${platformDistributions('win')}`);
await uploadS3('win');

await exec(`pnpm oclif pack tarballs --targets=${platformDistributions(platform)}`);
//Packages
await exec(`pnpm oclif pack win`);
await uploadS3('win', { pkg: true });
await exec(`pnpm oclif pack ${platform}`);
// Upload Tarballs
await uploadS3(platform);
// Upload packages
await uploadS3(platform, { pkg: true });

await promoteS3('win', version);
// Windows packs files under "win32" directory
// const pathToAssetWindows = `${PATH_TO_CLI}/dist/win32`;
// const files = fs.readdirSync(pathToAssetWindows);
Expand Down Expand Up @@ -166,9 +168,9 @@ async function main() {
main();

const uploadS3 = async (platform: 'macos' | 'deb' | 'win', options?: { pkg: boolean }) => {
const uploadRes = await exec(
`pnpm oclif upload ${options?.pkg ? '' : 'tarballs'} --targets=${platformDistributions(platform)}`
);
const uploadRes = options?.pkg
? await exec(`pnpm oclif upload ${platform}`)
: await exec(`pnpm oclif upload tarballs --targets=${platformDistributions(platform)}`);
console.log('Uploaded release', uploadRes.stdout);
};

Expand Down

0 comments on commit 44aa875

Please sign in to comment.