-
Notifications
You must be signed in to change notification settings - Fork 19
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
Integration with BrighterScript? #111
Comments
Unfortunately, there's not a nice way to integrate these. Currently you need to run bsc to put the code into a staging folder, then use roku-deploy to build the signed package, just like you described. I don't want to build dependencies on brighterscript into roku-deploy directly. However, I'd definitely be open to finding a way to make this flow easier. Option 1: granular roku-deploy cliFor a while now, we've wanted to improve the roku-deploy cli. Breaking out all of its various operations into individual cli commands. Something like this: roku-deploy zip --outFile app.zip --rootDir ./src
roku-deploy deploy --file app.zip
roku-deploy sign --file app.zip --outFile app.pkg With something like this, you could do the following: bsc --rootDir ./src --stagingDir ./dist
roku-deploy zip --outFile app.zip --rootDir ./src
roku-deploy sign --file app.zip --outFile app.pkg Option 2: brighterscript pluginBrighterScript has a plugin system, so you could write a plugin to run roku-deploy as part of the bsc flow. Perhaps something like this: (untested, just to get the general point across). import { Program, CompilerPlugin } from 'brighterscript';
import { rokuDeploy } from 'roku-deploy';
export default function () {
return {
name: 'sign-package',
// post-parsing validation
afterProgramTranspile: async (program: Program) => {
rokuDeploy.deployAndSignPackage({
host: 'ip-of-roku',
password: 'password for roku dev admin portal',
signingPassword: 'signing password'
//other options if necessary
}).then(function (pathToSignedPackage) {
console.log('Signed package created at ', pathToSignedPackage);
}, function (error) {
//it failed
console.error(error);
});
}
} as CompilerPlugin;
}; |
Thanks for the quick response! It seemed like This seems to be working for me for now. I created a couple gulp tasks like this:
Then I have these scripts defined in my
So now I can just run On a side note: a huge thank you for your work on this and BrighterScript! Really, tools like these are the only things that make doing Roku development bearable! |
The more I think of it, the more I like your idea of a bsc plugin. I could have one for setting the version number and one for signing. In theory I could have a separate |
@TwitchBronBron it's not immediately clear to me how to change the contents of the manifest. Is this possible or do I just have to do a brute force file rewrite after transpiling is done? |
We don't have a way to modify the manifest in BrighterScript at the moment. That should be possible once we land the file API PR in BrighterScript, but that might still be a month or two out. In the mean time, you're correct yet again: change it after it's been written to.the stagingDir |
I'm working on a project where I'm using BrighterScript. Maybe I'm missing something here but I'm trying to use roku-deploy to create my signed production package. During my development workflow, I use BrighterScript either by using a vscode build task to call
bsc
directly to build and deploy it or, if I need to debug, I use the vscode extension process here.When it comes time to create a signed package, I'd like to simply use
deployAndSignPackage
but that doesn't do thebsc
transpiling. I know I can manually do absc
build and THEN callzipPackage
,publish
, and thensignExistingPackage
but is there a better way?EDIT: I think even the method I laid out above wouldn't work for me. As part of my release I would like to increment the manifest build number but it looks like that's only called from
createPackage
but that will do a full build with BS untranspiled code. :(The text was updated successfully, but these errors were encountered: