Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How i can modify ManifestData before deploying? #43

Open
mostafaashraf92 opened this issue Sep 24, 2020 · 4 comments
Open

How i can modify ManifestData before deploying? #43

mostafaashraf92 opened this issue Sep 24, 2020 · 4 comments

Comments

@mostafaashraf92
Copy link

How i can modify ManifestData before deploying? i already know how to deal with rokudeploy.json but where i can modify manifest data ? As example i want to change the title of the app

@triwav
Copy link
Collaborator

triwav commented Sep 24, 2020

Are you wanting to do this as part of the callback while deploying or before hand?

@mostafaashraf92
Copy link
Author

mostafaashraf92 commented Sep 24, 2020

@triwav Yes as a part of the callback. The same way as providing options through editing rokudeploy.json. Where i can write this part?

@mostafaashraf92
Copy link
Author

@triwav I can see that when i write in rokudeploy.json the options is provided to deployment, but i can see info object can be passed as well , so where i can instantiate this info object ?

@triwav
Copy link
Collaborator

triwav commented Sep 25, 2020

Got it. So you would take the ManifestData and modify it out how you want. In your case that should be something like manifestData.title = 'New Title'. Then you need to change it back to a string like const stringifiedManifest = rokuDeploy.stringifyManifest(manifestData); and then write that to the manifest in your staging folder like

const manifestPath = path.join(info.stagingFolderPath, 'manifest');
await fsExtra.writeFile(manifestPath, stringifiedManifest);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants