|
@@ 471-500 (lines=30) @@
|
| 468 |
|
dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
|
| 469 |
|
;
|
| 470 |
|
|
| 471 |
|
fs.mkdirSync(dist, '0777', true);
|
| 472 |
|
fs.mkdirSync(dist + 'data');
|
| 473 |
|
fs.mkdirSync(dist + 'rainloop/v/' + versionFull, '0777', true);
|
| 474 |
|
|
| 475 |
|
return gulp.src('rainloop/v/' + cfg.devVersion + '/**/*', {base: 'rainloop/v/' + cfg.devVersion})
|
| 476 |
|
.pipe(chmod(0o644, 0o755))
|
| 477 |
|
.pipe(gulp.dest(dist + 'rainloop/v/' + versionFull));
|
| 478 |
|
});
|
| 479 |
|
|
| 480 |
|
gulp.task('rainloop:setup', ['rainloop:copy'], function() {
|
| 481 |
|
|
| 482 |
|
var
|
| 483 |
|
versionFull = pkg.version,
|
| 484 |
|
dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
|
| 485 |
|
;
|
| 486 |
|
|
| 487 |
|
fs.writeFileSync(dist + 'data/VERSION', versionFull);
|
| 488 |
|
fs.writeFileSync(dist + 'data/EMPTY', versionFull);
|
| 489 |
|
|
| 490 |
|
fs.writeFileSync(dist + 'index.php', fs.readFileSync('index.php', 'utf8')
|
| 491 |
|
.replace('\'APP_VERSION\', \'0.0.0\'', '\'APP_VERSION\', \'' + versionFull + '\'')
|
| 492 |
|
.replace('\'APP_VERSION_TYPE\', \'source\'', '\'APP_VERSION_TYPE\', \'' + (cfg.community ? 'community' : 'standard') + '\'')
|
| 493 |
|
);
|
| 494 |
|
|
| 495 |
|
fs.writeFileSync(dist + 'rainloop/v/' + versionFull + '/index.php.root', fs.readFileSync(dist + 'index.php'));
|
| 496 |
|
|
| 497 |
|
if (cfg.community)
|
| 498 |
|
{
|
| 499 |
|
require('rimraf').sync(dist + 'rainloop/v/' + versionFull + '/app/libraries/RainLoop/Providers/Prem.php');
|
| 500 |
|
}
|
| 501 |
|
|
| 502 |
|
cfg.destPath = cfg.releasesPath + '/webmail/' + versionFull + '/';
|
| 503 |
|
cfg.cleanPath = dist;
|
|
@@ 552-573 (lines=22) @@
|
| 549 |
|
{
|
| 550 |
|
return gulp.src(cfg.destPath + '/src/**/*', {base: cfg.destPath + '/src/'})
|
| 551 |
|
.pipe(gulp.dest(dist + 'app/'));
|
| 552 |
|
}
|
| 553 |
|
|
| 554 |
|
return true;
|
| 555 |
|
});
|
| 556 |
|
|
| 557 |
|
gulp.task('rainloop:owncloud:copy-rainloop:clean', ['rainloop:owncloud:copy-rainloop'], function() {
|
| 558 |
|
return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
|
| 559 |
|
});
|
| 560 |
|
|
| 561 |
|
gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy', 'rainloop:owncloud:copy-rainloop'], function() {
|
| 562 |
|
|
| 563 |
|
var
|
| 564 |
|
versionFull = pkg.ownCloudVersion,
|
| 565 |
|
dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/'
|
| 566 |
|
;
|
| 567 |
|
|
| 568 |
|
fs.writeFileSync(dist + 'rainloop/appinfo/info.xml',
|
| 569 |
|
fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8')
|
| 570 |
|
.replace('<version>0.0</version>', '<version>' + versionFull + '</version>')
|
| 571 |
|
.replace('<licence></licence>', '<licence>' + (cfg.community ? 'AGPLv3' : 'RainLoop Software License') + '</licence>')
|
| 572 |
|
);
|
| 573 |
|
|
| 574 |
|
fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull);
|
| 575 |
|
fs.writeFileSync(dist + 'rainloop/VERSION', versionFull);
|
| 576 |
|
|