-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*.zip | ||
*.gz | ||
# Do not index node.js modules that are used for building | ||
node_modules | ||
|
||
# Do not index releases | ||
release |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var eventStream = require('event-stream'), | ||
gulp = require('gulp'), | ||
chmod = require('gulp-chmod'), | ||
zip = require('gulp-zip'), | ||
tar = require('gulp-tar'), | ||
gzip = require('gulp-gzip'), | ||
rename = require('gulp-rename'); | ||
|
||
gulp.task('prepare-release', function() { | ||
var version = require('./package.json').version; | ||
|
||
return eventStream.merge( | ||
getSources() | ||
.pipe(zip('mibew-operator-status-plugin-' + version + '.zip')), | ||
getSources() | ||
.pipe(tar('mibew-operator-status-plugin-' + version + '.tar')) | ||
.pipe(gzip()) | ||
) | ||
.pipe(chmod(0644)) | ||
.pipe(gulp.dest('release')); | ||
}); | ||
|
||
// Builds and packs plugins sources | ||
gulp.task('default', ['prepare-release'], function() { | ||
// The "default" task is just an alias for "prepare-release" task. | ||
}); | ||
|
||
/** | ||
* Returns files stream with the plugin sources. | ||
* | ||
* @returns {Object} Stream with VinylFS files. | ||
*/ | ||
var getSources = function() { | ||
return gulp.src([ | ||
'Controller/*', | ||
'LICENSE', | ||
'Plugin.php', | ||
'README.md', | ||
'routing.yml' | ||
], | ||
{base: './'} | ||
) | ||
.pipe(rename(function(path) { | ||
path.dirname = 'Mibew/Mibew/Plugin/OperatorStatus/' + path.dirname; | ||
})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.3.0", | ||
"devDependencies": { | ||
"event-stream": "~3.3.1", | ||
"gulp": "^3.9.1", | ||
"gulp-chmod": "~1.2.0", | ||
"gulp-gzip": "~1.1.0", | ||
"gulp-rename": "~1.2.2", | ||
"gulp-tar": "~1.4.0", | ||
"gulp-zip": "~3.0.2" | ||
} | ||
} |