Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. let ignored = []
  2.  
  3. program
  4. .command('deploy')
  5. .option('-b, --bucket <s>', 'Bucket name', setBucket)
  6. .option('-k, --key <s>', 'AWS Key', setKey)
  7. .option('-s, --secret <s>', 'AWS Secret', setSecret)
  8. .option('-e, --ignore <items>', 'Ignore files', setIgnore)
  9. .action(function () {
  10. s3Services.setAwsCredentials(awsCredentials)
  11.  
  12. filesystem.getAllFilesFrom(rootFolder, function (filePath, data) {
  13. if(!ignored.includes(filePath)) {
  14. s3Services.uploadObject(bucketParams.Bucket, filePath, data)
  15. }
  16. })
  17. })
  18.  
  19. function setIgnore(val) {
  20. ignored = val.split(',')
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement