-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
21 lines (18 loc) · 740 Bytes
/
gulpfile.js
File metadata and controls
21 lines (18 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// https://nodejs.dev/learn/how-to-read-environment-variables-from-nodejs
require('./node_modules/dotenv').config();
const { series } = require('gulp');
const { src, dest } = require('gulp');
const xmlPoke = require('gulp-xmlpoke');
// The `build` function is exported so it is public and can be run with the `gulp` command.
// It can also be used within the `series()` composition.
function updateTizenConfig() {
return src('./build/config.xml')
.pipe(
xmlPoke({
replacements: [{ xpath: '/*/@version', value: process.env.REACT_APP_VERSION }],
}),
)
.pipe(dest('./build/'));
}
exports.updateTizenConfig = updateTizenConfig;
exports.default = series(updateTizenConfig);