Skip to content

Commit

Permalink
Add support for force releasing all songs from GH Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanlucut committed Sep 23, 2023
1 parent c6dc387 commit 4995b34
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ declare global {
GDRIVE_BES_CLIENT_ID: string;
GDRIVE_BES_CLIENT_SECRET: string;
GDRIVE_BES_CLIENT_REFRESH_TOKEN: string;

// From GH Actions
FORCE_RELEASE_OF_ALL_SONGS: string;
}
}
}
Expand Down
20 changes: 19 additions & 1 deletion src/gDriveConverterRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,25 @@ export const convertSongsToPP7FormatRemotely = async ({

if (isAFirstDeployment) {
console.log(
`[Remote]: No previous deployment found in. Skip incremental deployments by doing a full deployment. Please proceed with a full manual import in PP7.`,
`[Remote]: No previous deployment found in. Skip incremental deployments by doing a full deployment. Please proceed with applying the theme.`,
);

await uploadSongsAndManifestToGDrive(
getConvertedAndWrittenToLocalOutDirSongs(
deployableSongs,
deploymentVersionedDir,
config,
),
versionedDir,
localManifestFilePath,
);

return;
}

if (process.env.FORCE_RELEASE_OF_ALL_SONGS === 'true') {
console.log(
`[Remote]: Force release of all songs from GH. Skip incremental deployments by doing a full deployment. Please proceed with applying the theme.`,
);

await uploadSongsAndManifestToGDrive(
Expand Down

0 comments on commit 4995b34

Please sign in to comment.