Skip to content
Snippets Groups Projects
Commit 6e5c7bf3 authored by Haelwenn's avatar Haelwenn
Browse files

Use export-subst gitattribute to allow tarball builds

For example it would do the following:

    let subst = "d3bf557c";
parent 1d679b59
No related branches found
No related tags found
No related merge requests found
/build/webpack.prod.conf.js export-subst
......@@ -11,9 +11,16 @@ var env = process.env.NODE_ENV === 'testing'
? require('../config/test.env')
: config.build.env
let commitHash = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString();
let commitHash = (() => {
let subst = "$Format:%h$";
if(!subst.match(/Format:/)) {
return subst;
} else {
return require('child_process')
.execSync('git rev-parse --short HEAD')
.toString();
}
})();
var webpackConfig = merge(baseWebpackConfig, {
mode: 'production',
......
Use export-subst gitattribute to allow tarball builds
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