Merge branch 'export-subst-hash' into 'develop'
Use export-subst gitattribute to allow tarball builds See merge request pleroma/pleroma-fe!1854
This commit is contained in:
commit
d356841441
|
@ -0,0 +1 @@
|
||||||
|
/build/webpack.prod.conf.js export-subst
|
|
@ -11,9 +11,16 @@ var env = process.env.NODE_ENV === 'testing'
|
||||||
? require('../config/test.env')
|
? require('../config/test.env')
|
||||||
: config.build.env
|
: config.build.env
|
||||||
|
|
||||||
let commitHash = require('child_process')
|
let commitHash = (() => {
|
||||||
|
const subst = "$Format:%h$";
|
||||||
|
if(!subst.match(/Format:/)) {
|
||||||
|
return subst;
|
||||||
|
} else {
|
||||||
|
return require('child_process')
|
||||||
.execSync('git rev-parse --short HEAD')
|
.execSync('git rev-parse --short HEAD')
|
||||||
.toString();
|
.toString();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
var webpackConfig = merge(baseWebpackConfig, {
|
var webpackConfig = merge(baseWebpackConfig, {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Use export-subst gitattribute to allow tarball builds
|
Loading…
Reference in New Issue