Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 54s
28 lines
440 B
JavaScript
Executable File
28 lines
440 B
JavaScript
Executable File
/**
|
|
* @prettier
|
|
*/
|
|
|
|
const { gitDescribeSync } = require("git-describe")
|
|
|
|
function getRepoInfo() {
|
|
try {
|
|
return gitDescribeSync(__dirname)
|
|
} catch (e) {
|
|
console.error(e)
|
|
return {
|
|
hash: "noGit",
|
|
dirty: false,
|
|
}
|
|
}
|
|
}
|
|
|
|
function getDevtool(sourcemaps, minimize) {
|
|
if (!sourcemaps) return false
|
|
return minimize ? "source-map" : "cheap-module-source-map"
|
|
}
|
|
|
|
module.exports = {
|
|
getRepoInfo,
|
|
getDevtool,
|
|
}
|