Skip to content

Commit

Permalink
(158) clean up after creating ipas
Browse files Browse the repository at this point in the history
also remove the w in the release name for k2genmity
  • Loading branch information
acquitelol committed Jan 4, 2023
1 parent fd8419e commit 169926f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-k2genmity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: rosiecord_${{ steps.version.outputs.DISCORD_VERSION }}_wK2Genmity
automatic_release_tag: rosiecord_${{ steps.version.outputs.DISCORD_VERSION }}_k2genmity
title: Rosiecord ${{ steps.version.outputs.DISCORD_VERSION }} (K2Genmity)
files: Dist_K2genmity/*.ipa
10 changes: 9 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ const main = async (): Promise<void> => {
)
});

const IPA_LINK = "https://cdn.discordapp.com/attachments/1015971724895989780/1055819923093467179/Discord_159.0.ipa";
const IPA_LINK = "https://cdn.discordapp.com/attachments/986937851042213888/1054952894589309008/Discord_158.0.ipa";
const IPA_NAME = IPA_LINK.split('/')[6].split(".")[0] // Gets just the IPA Name, "Discord_158" or whatever

await Shell.write(`${S.PENDING}${M.CYAN} Downloading ${M.PINK}\"${IPA_NAME}.ipa\"${M.CYAN} into ${M.PINK}\"./Ipas\".${M.ENDC}\r`);
Expand Down Expand Up @@ -400,6 +400,14 @@ const main = async (): Promise<void> => {
// await new Promise((resolve) => setTimeout(() => resolve(), 2000));
}

await Shell.write(`${S.PENDING}${M.CYAN} Cleaning up ${M.PINK}\"remaining files which aren't needed\"${M.CYAN}...${M.ENDC}\r`);
await Shell.runSilently(`rm -rf Ipas/* & wait $!;`, (stderr) => {
Shell.write( stderr
? `${S.FAILURE} An error occurred while cleaning up ${M.PINK}\"remaning files\"${M.CYAN}.${M.ENDC}\n`
: `${S.SUCCESS} Successfully cleaned up ${M.PINK}\"remaining files which aren't needed\"${M.GREEN}.${M.ENDC}\n`
)
});

const END_TIME = Date.now();
await Shell.write(`${S.SUCCESS} Successfully built ${M.PINK}Rosiecord${M.GREEN} in ${M.CYAN}${(END_TIME-START_TIME)/1000} seconds${M.GREEN}.`)
}
Expand Down

0 comments on commit 169926f

Please sign in to comment.