<commit_before>var shelljs = require('shelljs');
var express = require('express');
var app = express();
var bodyParser = require('body-parser');

app.use(bodyParser.json()); // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded



app.post('/deploy', function (req, res) {
    var repo = req.body.repo;
    var apiFolder = req.body.apiFolder;
    var makeScript = req.body.makeScript;
    var org = req.body.org;
    var env = req.body.env;
    var userName = req.body.userName;
    var pw = req.body.pw;

    console.log(userName);
    console.log(repo);
    console.log(apiFolder);
    console.log(makeScript);
    console.log(org);
    console.log(env);

    console.log(shelljs.exec('ae_username="'+userName+'" sh -c \'echo "Hello $ae_username"\''));

//     while(true){
//     console.log(shelljs.exec("echo $ae_username"));
// }
    // shelljs.exec("git clone "+repo+" "+org+env, function(code, output){
    //         console.log('Exit code:', code);
    //         console.log('Program output:', output);
    //         shelljs.cd(org+env+"/"+apiFolder);
    //         console.log(shelljs.exec(makeScript));
    // });

    // console.log(shelljs.exec('sh testing/apiproxies/apigee-nodejs-fileserver/make.sh'));

    // //** look into packaging this outside
    // //cd apiproxies/apigee-nodejs-fileserver
    // shelljs.cd('testing/apiproxies/apigee-nodejs-fileserver');
    // //npm install **look at later
    // console.log(shelljs.exec('npm install').output);
    // //cd node
    // shelljs.cd('node');
    // //npm install
    // console.log(shelljs.exec('npm install').output);
    // //grunt-cli
    // //shell.exec('grunt --env=test --curl=true --username=akoo@apigee.com --password=$<PASSWORD> --upload-modules=true --debug=true --force');

})

var server = app.listen(3000, function () {
  var host = server.address().address;
  var port = server.address().port;

  console.log('Example app listening at http://%s:%s', host, port);
});


<commit_msg>pass credentials, org and env to shell script<commit_after>var shelljs = require('shelljs');
var express = require('express');
var app = express();
var bodyParser = require('body-parser');

app.use(bodyParser.json()); // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded



app.post('/deploy', function (req, res) {
    var repo = req.body.repo;
    var apiFolder = req.body.apiFolder;
    var makeScript = req.body.makeScript;
    var org = req.body.org;
    var env = req.body.env;
    var userName = req.body.userName;
    var pw = req.body.pw;

    console.log(userName);
    console.log(repo);
    console.log(apiFolder);
    console.log(makeScript);
    console.log(org);
    console.log(env);



    shelljs.exec("git clone "+repo+" "+org+env, function(code, output){
            console.log('Exit code:', code);
            console.log('Program output:', output);
            shelljs.cd(org+env+"/"+apiFolder);
            console.log(shelljs.exec('ae_username='+userName+' ae_password='+pw+' env='+env+' org='+org+' sh -c \'sh '+makeScript +'\''));
    });

    // console.log(shelljs.exec('sh testing/apiproxies/apigee-nodejs-fileserver/make.sh'));

    // //** look into packaging this outside
    // //cd apiproxies/apigee-nodejs-fileserver
    // shelljs.cd('testing/apiproxies/apigee-nodejs-fileserver');
    // //npm install **look at later
    // console.log(shelljs.exec('npm install').output);
    // //cd node
    // shelljs.cd('node');
    // //npm install
    // console.log(shelljs.exec('npm install').output);
    // //grunt-cli
    // //shell.exec('grunt --env=test --curl=true --username=<EMAIL> --password=<PASSWORD> --upload-modules=true --debug=true --force');

});

var server = app.listen(3000, function () {
  var host = server.address().address;
  var port = server.address().port;

  console.log('Example app listening at http://%s:%s', host, port);
});



{'fraction_non_alphanumeric': 0.18706467661691542, 'fraction_numerical': 0.001990049751243781, 'mean_word_length': 3.0493454179254784, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '990077', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1301, 'n_words': 257}