fixed git tag in webpack with drone
This commit is contained in:
parent
d0092657d7
commit
47c5b1e6a4
@ -10,11 +10,15 @@ const path = require("path");
|
|||||||
|
|
||||||
const DEVELOPMENT = process.env.NODE_ENV === "development";
|
const DEVELOPMENT = process.env.NODE_ENV === "development";
|
||||||
|
|
||||||
const version = require('child_process')
|
let version = process.env.DRONE_TAG;
|
||||||
|
|
||||||
|
if(!version){
|
||||||
|
version = require('child_process')
|
||||||
.execSync("git describe --abbrev=0")
|
.execSync("git describe --abbrev=0")
|
||||||
.toString()
|
.toString();
|
||||||
.replace("v", "")
|
}
|
||||||
.trim();
|
|
||||||
|
version = version.replace("v", "").trim();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: path.join(__dirname, "src"),
|
context: path.join(__dirname, "src"),
|
||||||
|
Loading…
Reference in New Issue
Block a user