This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added new build system to Amplify Video. Allows easier env switches and custom overrides. * Removed setup command from commands. Replaced with build command. * Version bump * Added envInit due to PrePush not working for new one click apps * Changed error message for failed S3 sync
- Loading branch information
Showing
13 changed files
with
407 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const inquirer = require('inquirer'); | ||
const fs = require('fs'); | ||
|
||
const subcommand = 'build'; | ||
const category = 'video'; | ||
|
||
module.exports = { | ||
name: subcommand, | ||
run: async (context) => { | ||
const { amplify } = context; | ||
const targetDir = amplify.pathManager.getBackendDirPath(); | ||
const amplifyMeta = amplify.getProjectMeta(); | ||
|
||
if (!(category in amplifyMeta) || Object.keys(amplifyMeta[category]).length === 0) { | ||
context.print.error(`You have no ${category} projects.`); | ||
return; | ||
} | ||
|
||
const chooseProject = [ | ||
{ | ||
type: 'list', | ||
name: 'resourceName', | ||
message: 'Choose what project you want to build?', | ||
choices: Object.keys(amplifyMeta[category]), | ||
default: Object.keys(amplifyMeta[category])[0], | ||
}, | ||
]; | ||
const shared = await inquirer.prompt(chooseProject); | ||
|
||
const options = amplifyMeta.video[shared.resourceName]; | ||
|
||
const { buildTemplates } = require(`../../provider-utils/${options.providerPlugin}/utils/video-staging`); | ||
if (!buildTemplates) { | ||
context.print.error('No builder is configured for this provider'); | ||
return; | ||
} | ||
|
||
const props = JSON.parse(fs.readFileSync(`${targetDir}/video/${shared.resourceName}/props.json`)); | ||
|
||
return buildTemplates(context, props); | ||
}, | ||
|
||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.