fix git dubious ownership error in dev docker setup
This commit is contained in:
parent
b92f63ca88
commit
0fb1bf7095
@ -14,10 +14,18 @@ const corsHeaders = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// XXX this fragile ... eb could change the version label ... but it works for now
|
let commitHash
|
||||||
const commitHash = isProd
|
if (isProd) {
|
||||||
? Object.keys(require('/opt/elasticbeanstalk/deployment/app_version_manifest.json').RuntimeSources['stacker.news'])[0].match(/^app-(.+)-/)[1] // eslint-disable-line
|
// XXX this fragile ... eb could change the version label ... but it works for now
|
||||||
: require('child_process').execSync('git rev-parse HEAD').toString().slice(0, 4)
|
commitHash = Object.keys(require('/opt/elasticbeanstalk/deployment/app_version_manifest.json').RuntimeSources['stacker.news'])[0].match(/^app-(.+)-/)[1] // eslint-disable-line
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
commitHash = require('child_process').execSync('git rev-parse HEAD').toString().slice(0, 4)
|
||||||
|
} catch (e) {
|
||||||
|
console.log('could not get commit hash with `git rev-parse HEAD` ... using 0000')
|
||||||
|
commitHash = '0000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = withPlausibleProxy()({
|
module.exports = withPlausibleProxy()({
|
||||||
env: {
|
env: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user