Skip to content
Snippets Groups Projects
Commit 67cac3f3 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Gulp now translates the package version to the wordpress version.

parent 8be1c0a7
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ const gulp = require("gulp");
const replace = require("gulp-replace");
const zip = require("gulp-zip");
const del = require("del");
const fs = require("fs");
const dir = {
src: ".",
......@@ -27,6 +28,7 @@ function clean() {
}
function copyPHP() {
const { version } = JSON.parse(fs.readFileSync("package.json"));
return gulp
.src(php.src)
.pipe(
......@@ -35,6 +37,7 @@ function copyPHP() {
"$GLOBALS['build'] = 'release';"
)
)
.pipe(replace("Version: 1.0", `Version: ${version}`))
.pipe(gulp.dest(php.build));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment