Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let ignored = []
- program
- .command('deploy')
- .option('-b, --bucket <s>', 'Bucket name', setBucket)
- .option('-k, --key <s>', 'AWS Key', setKey)
- .option('-s, --secret <s>', 'AWS Secret', setSecret)
- .option('-e, --ignore <items>', 'Ignore files', setIgnore)
- .action(function () {
- s3Services.setAwsCredentials(awsCredentials)
- filesystem.getAllFilesFrom(rootFolder, function (filePath, data) {
- if(!ignored.includes(filePath)) {
- s3Services.uploadObject(bucketParams.Bucket, filePath, data)
- }
- })
- })
- function setIgnore(val) {
- ignored = val.split(',')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement