-
Notifications
You must be signed in to change notification settings - Fork 15
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
3 changed files
with
67 additions
and
1 deletion.
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
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,37 @@ | ||
const gulp = require('gulp'); | ||
const zip = require('gulp-zip'); | ||
const release = require('gulp-github-release'); | ||
const fs = require('fs'); | ||
const replace = require('gulp-replace'); | ||
const git = require('gulp-git'); | ||
|
||
|
||
var package_json = JSON.parse(fs.readFileSync('./package.json')); | ||
var release_filename = package_json.name + '-v' + package_json.version + '.kpz'; | ||
|
||
var pm_file = 'CoverFlow.pm'; | ||
var pm_file_path = './Koha/Plugin/Com/ByWaterSolutions/'; | ||
var pm_file_path_full = pm_file_path + pm_file; | ||
|
||
console.log(release_filename); | ||
|
||
gulp.task('build', () => { | ||
// Set module version | ||
gulp.src(pm_file_path_full) | ||
.pipe(replace('{VERSION}', package_json.version)) | ||
.pipe(gulp.dest(pm_file_path)); | ||
|
||
//FIXME: This doesn't work! It only zips of the first level of directories, leaving them empty | ||
gulp.src(['./*', '!gulpfile.js', '!node_modules', '!package.json', '!README.md']) | ||
.pipe(zip(release_filename)) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
|
||
gulp.task('release', () => { | ||
gulp.src(release_filename) | ||
.pipe(release({ | ||
manifest: require('./package.json') // package.json from which default values will be extracted if they're missing | ||
})) | ||
.pipe(git.checkoutFiles()); | ||
}); | ||
|
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,29 @@ | ||
{ | ||
"name": "koha-coverflow-plugin", | ||
"version": "2.2.0", | ||
"description": "Koha CoverFlow Plugin", | ||
"main": "index.js", | ||
"dependencies": { | ||
"gulp-git": "^1.11.0", | ||
"gulp-zip": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"gulp": "^3.9.1", | ||
"gulp-cli": "^1.2.2", | ||
"gulp-github-release": "^1.1.5", | ||
"gulp-zip": "^3.2.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/bywatersolutions/koha-plugin-coverflow.git" | ||
}, | ||
"author": "Kyle M Hall <[email protected]>", | ||
"license": "GPL-3.0", | ||
"bugs": { | ||
"url": "https://github.com/bywatersolutions/koha-plugin-coverflow/issues" | ||
}, | ||
"homepage": "https://github.com/bywatersolutions/koha-plugin-coverflow#readme" | ||
} |