Skip to content

Commit

Permalink
1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RainLoop committed Sep 19, 2017
1 parent 350e065 commit 33a9234
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6,765 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
/build/local
/build/dist
/build/tmp
/build/docker
/dist
/data
.DS_Store
/tests/fix.php
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '2'
services:
node:
image: node:8.4-alpine
working_dir: /usr/app
command: sh -c 'yarn install && yarn global add [email protected] && gulp all:docker'
volumes:
- ./dev:/usr/app/dev
- ./rainloop:/usr/app/rainloop
- ./assets:/usr/app/assets
- ./vendors:/usr/app/vendors
- ./build/owncloud:/usr/app/build/owncloud
- ./dist:/usr/app/dist

- ./.eslintrc.js:/usr/app/.eslintrc.js
- ./gulpfile.js:/usr/app/gulpfile.js
- ./index.php:/usr/app/index.php
- ./package.json:/usr/app/package.json
- ./webpack.config.builder.js:/usr/app/webpack.config.builder.js
- ./webpack.config.js:/usr/app/webpack.config.js
- ./yarn.lock:/usr/app/yarn.lock

- ./build/docker/node_modules:/usr/app/node_modules
- ./build/docker/tmp:/tmp
61 changes: 26 additions & 35 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,37 +130,6 @@ function copyFile(sFile, sNewFile, callback)
callback();
}

function signFile(sFile, callback)
{
var exec = require('child_process').exec;
exec('gpg2 --openpgp -u 87DA4591 -a -b ' + sFile, function(err) {
if (err) {
gutil.log('gpg error: skip');
}
callback();
});
}

function signFileTask(callback) {
if (argv.sign)
{
signFile(cfg.destPath + cfg.zipFile, function() {
if (cfg.zipFileShort)
{
signFile(cfg.destPath + cfg.zipFileShort, callback);
}
else
{
callback();
}
});
}
else
{
callback();
}
};

cfg.paths.globjs = 'dev/**/*.js';
cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/';
cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/';
Expand Down Expand Up @@ -521,7 +490,13 @@ gulp.task('rainloop:shortname', ['rainloop:zip'], function(callback) {
copyFile(cfg.destPath + cfg.zipFile, cfg.destPath + cfg.zipFileShort, callback);
});

gulp.task('rainloop:sign', ['rainloop:shortname'], signFileTask);
gulp.task('rainloop:copy-dist', ['rainloop:shortname'], function(callback) {
var newPath = cfg.destPath.replace('build/dist/releases', 'dist/releases');
fs.mkdirSync(newPath, '0777', true);
copyFile(cfg.destPath + cfg.zipFile, newPath + cfg.zipFile, function() {
copyFile(cfg.destPath + cfg.zipFileShort, newPath + cfg.zipFileShort, callback);
});
});

// build (OwnCloud)
gulp.task('rainloop:owncloud:copy', function() {
Expand Down Expand Up @@ -594,7 +569,13 @@ gulp.task('rainloop:owncloud:shortname', ['rainloop:owncloud:zip'], function(cal
copyFile(cfg.destPath + cfg.zipFile, cfg.destPath + cfg.zipFileShort, callback);
});

gulp.task('rainloop:owncloud:sign', ['rainloop:owncloud:shortname'], signFileTask);
gulp.task('rainloop:owncloud:copy-dist', ['rainloop:owncloud:shortname'], function(callback) {
var newPath = cfg.destPath.replace('build/dist/releases', 'dist/releases');
fs.mkdirSync(newPath, '0777', true);
copyFile(cfg.destPath + cfg.zipFile, newPath + cfg.zipFile, function() {
copyFile(cfg.destPath + cfg.zipFileShort, newPath + cfg.zipFileShort, callback);
});
});

// main
gulp.task('moment', ['moment:locales']);
Expand All @@ -607,11 +588,13 @@ gulp.task('clean', ['js:clean', 'css:clean', 'assets:clean']);

gulp.task('rainloop:start', ['rainloop:copy', 'rainloop:setup']);

gulp.task('rainloop', ['rainloop:start', 'rainloop:zip', 'rainloop:clean', 'rainloop:shortname', 'rainloop:sign']);
gulp.task('rainloop', ['rainloop:start', 'rainloop:zip', 'rainloop:clean', 'rainloop:shortname']);
gulp.task('rainloop:docker', ['rainloop', 'rainloop:copy-dist']);

gulp.task('owncloud', ['rainloop:owncloud:copy',
'rainloop:owncloud:copy-rainloop', 'rainloop:owncloud:copy-rainloop:clean',
'rainloop:owncloud:setup', 'rainloop:owncloud:zip', 'rainloop:owncloud:clean', 'rainloop:owncloud:shortname', 'rainloop:owncloud:sign']);
'rainloop:owncloud:setup', 'rainloop:owncloud:zip', 'rainloop:owncloud:clean', 'rainloop:owncloud:shortname']);
gulp.task('owncloud:docker', ['owncloud', 'rainloop:owncloud:copy-dist']);

// default
gulp.task('default', function(callback) {
Expand All @@ -629,6 +612,14 @@ gulp.task('watch', ['css:main', 'js:validate'], function() {
// aliases
gulp.task('build', ['rainloop']);

gulp.task('all', function(callback) {
runSequence('rainloop', 'owncloud', callback);
});

gulp.task('all:docker', function(callback) {
runSequence('rainloop:docker', 'owncloud:docker', callback);
});

gulp.task('d', ['default']);
gulp.task('w', ['watch']);
gulp.task('l', ['js:libs']);
Expand Down
Loading

0 comments on commit 33a9234

Please sign in to comment.