mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Merge pull request #71 from jaws-stack/v1.0-deploy
new passing testcase
This commit is contained in:
commit
af7b84f0d8
@ -172,7 +172,7 @@ module.exports = function(JAWS) {
|
||||
resolve();
|
||||
})
|
||||
.then(function() { //Make skeleton dir structure and initial files
|
||||
var adminEnv = 'ADMIN_AWS_PROFILE=' + project.awsProfile + os.EOF;
|
||||
var adminEnv = 'ADMIN_AWS_PROFILE=' + project.awsProfile + os.EOL;
|
||||
|
||||
// Set project root path. Append unique id if name is in use
|
||||
if (fs.existsSync(path.join(JAWS._meta.cwd, project.name))) {
|
||||
@ -191,13 +191,14 @@ module.exports = function(JAWS) {
|
||||
cfTemplate.Parameters.aaDataModelPrefix.AllowedValues = [project.stages[0]];
|
||||
cfTemplate.Parameters.aaNotficationEmail.Default = project.notificationEmail;
|
||||
|
||||
var rootPath = JAWS._meta.projectRootPath;
|
||||
return Promise.all([
|
||||
fs.mkdirAsync(JAWS._meta.projectRootPath),
|
||||
fs.mkdirAsync(path.join(JAWS._meta.projectRootPath, 'back')),
|
||||
fs.mkdirAsync(path.join(JAWS._meta.projectRootPath, 'front')),
|
||||
fs.mkdirAsync(path.join(JAWS._meta.projectRootPath, 'tests')),
|
||||
fs.writeFileAsync(path.join(JAWS._meta.projectRootPath, 'admin.env'), adminEnv),
|
||||
fs.writeFileAsync(path.join(JAWS._meta.projectRootPath, 'jaws-cf.json'), cfTemplate),
|
||||
fs.mkdirAsync(rootPath),
|
||||
fs.mkdirAsync(path.join(rootPath, 'back')),
|
||||
fs.mkdirAsync(path.join(rootPath, 'front')),
|
||||
fs.mkdirAsync(path.join(rootPath, 'tests')),
|
||||
fs.writeFileAsync(path.join(rootPath, 'admin.env'), adminEnv),
|
||||
fs.writeFileAsync(path.join(rootPath, 'jaws-cf.json'), JSON.stringify(cfTemplate, null, 2)),
|
||||
]);
|
||||
}).then(function() {
|
||||
|
||||
@ -228,7 +229,7 @@ module.exports = function(JAWS) {
|
||||
fs.writeFileSync(path.join(JAWS._meta.projectRootPath, 'jaws.json'), JSON.stringify(jawsJson, null, 2));
|
||||
fs.writeFileSync(
|
||||
path.join(JAWS._meta.projectRootPath, 'jaws-swagger.json'),
|
||||
_createSwaggerTemplate(project.name)
|
||||
JSON.stringify(_createSwaggerTemplate(project.name), null, 2)
|
||||
);
|
||||
|
||||
console.log('Your project "' +
|
||||
|
||||
@ -13,6 +13,7 @@ var JAWS = require('../../lib/index.js');
|
||||
describe('new', function() {
|
||||
before(function(done) {
|
||||
this.timeout(0); //dont timeout anything, creating tables, deleting tables etc
|
||||
console.error('>tmp dir for proj:', projDir);
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user