Incorporate commit hash
This commit is contained in:
parent
28fb3e4102
commit
109b919c6c
|
@ -687,10 +687,10 @@ function Settings({ onClose }) {
|
||||||
type="text"
|
type="text"
|
||||||
class="version-string"
|
class="version-string"
|
||||||
readOnly
|
readOnly
|
||||||
size="18" // Manually calculated here
|
size={10 /* build time */ + (1+8) /* commit hash */ + '-dtth'.length}
|
||||||
value={`${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${
|
value={`${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${
|
||||||
__COMMIT_HASH__ ? `.${__COMMIT_HASH__}` : ''
|
__COMMIT_HASH__ ? `.${__COMMIT_HASH__.slice(0, 8)}` : ''
|
||||||
}`}
|
}-dtth`}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.target.select();
|
e.target.select();
|
||||||
// Copy to clipboard
|
// Copy to clipboard
|
||||||
|
|
|
@ -25,8 +25,12 @@ try {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// If error, means git is not installed or not a git repo (could be downloaded instead of git cloned)
|
// If error, means git is not installed or not a git repo (could be downloaded instead of git cloned)
|
||||||
// Fallback to random hash which should be different on every build run 🤞
|
// Fallback to random hash which should be different on every build run 🤞
|
||||||
commitHash = uid();
|
if (process.env.PHANPY_COMMIT_HASH) {
|
||||||
fakeCommitHash = true;
|
commitHash = process.env.PHANPY_COMMIT_HASH;
|
||||||
|
} else {
|
||||||
|
commitHash = uid();
|
||||||
|
fakeCommitHash = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const rollbarCode = fs.readFileSync(
|
const rollbarCode = fs.readFileSync(
|
||||||
|
|
Loading…
Reference in a new issue