Update deps. Fix version string.
This commit is contained in:
parent
2e8ae301c5
commit
0e5b463acf
4 changed files with 12 additions and 6 deletions
9
ghu.js
9
ghu.js
|
@ -1,7 +1,7 @@
|
|||
const {resolve, join} = require('path');
|
||||
const {
|
||||
default: ghu,
|
||||
autoprefixer, cssmin, ife, includeit, jade, jszip,
|
||||
ghu,
|
||||
autoprefixer, cssmin, each, ife, includeit, jade, jszip,
|
||||
less, mapfn, newerThan, read, remove, run, uglify, watch, wrap, write
|
||||
} = require('ghu');
|
||||
|
||||
|
@ -88,6 +88,11 @@ ghu.task('build:copy', runtime => {
|
|||
|
||||
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.jade, ! **/conf/*.json`)
|
||||
.then(newerThan(mapper))
|
||||
.then(each(obj => {
|
||||
if (/index\.php$/.test(obj.source)) {
|
||||
obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version);
|
||||
}
|
||||
}))
|
||||
.then(write(mapper, {overwrite: true, cluster: true})),
|
||||
|
||||
read(`${ROOT}/*.md`)
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
"build": "npm run -s ghu release"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.3.17",
|
||||
"babel-core": "6.3.21",
|
||||
"babel-eslint": "5.0.0-beta6",
|
||||
"babel-preset-es2015": "6.3.13",
|
||||
"eslint": "1.10.3",
|
||||
"ghu": "0.2.2"
|
||||
"ghu": "0.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=5.0.0"
|
||||
|
|
|
@ -75,7 +75,7 @@ class Setup {
|
|||
private function add_app_metadata() {
|
||||
|
||||
$this->set('NAME', 'h5ai');
|
||||
$this->set('VERSION', '{{pkg.version}}');
|
||||
$this->set('VERSION', H5AI_VERSION);
|
||||
$this->set('FILE_PREFIX', '_h5ai');
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
define('MIN_PHP_VERSION', '5.4.0');
|
||||
define('H5AI_VERSION', '{{VERSION}}');
|
||||
define('MIN_PHP_VERSION', '5.5.0');
|
||||
|
||||
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
|
||||
header('Content-type: text/plain;charset=utf-8');
|
||||
|
|
Loading…
Add table
Reference in a new issue