Sign app for publishing (#38)
* Sign app for publishing * update gitignore * refactor input args * Change instance api sorting * Better instance sorting * Instance filter * remove hardcoded instance * script cleanups * Unused function
This commit is contained in:
1 parent
4640a34863
commit
7a155c689e
15 files changed
+636
-252
No files matched your search
+17
-11
@@ -1,23 +1,29 @@
|
||||
const rokuDeploy = require('roku-deploy');
|
||||
const dotenv = require('dotenv')
|
||||
const dotenv = require('dotenv');
|
||||
const fs = require('fs');
|
||||
const { exit } = require('process');
|
||||
|
||||
if(process.argv.length !== 3) {
|
||||
console.error("Invalid usage! usage: npm run screenshot -- filename")
|
||||
exit(-1)
|
||||
console.error("Invalid usage! usage: npm run screenshot -- filename");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
const filename = process.argv[2]
|
||||
const config = dotenv.parse(fs.readFileSync('.vscode/.env'))
|
||||
const filename = process.argv[2];
|
||||
const config = dotenv.parse(fs.readFileSync('.vscode/.env'));
|
||||
|
||||
rokuDeploy.takeScreenshot({
|
||||
const options = {
|
||||
host: config.ROKU_DEV_TARGET,
|
||||
password: config.ROKU_DEVPASSWORD,
|
||||
outDir: '.',
|
||||
outFile: filename
|
||||
}).then(function(filename){
|
||||
console.log(`${filename} created`)
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
};
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
await rokuDeploy.takeScreenshot(options);
|
||||
console.log(`${filename} created`);
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user