Incorporate commit hash
This commit is contained in:
parent
56fdd902f7
commit
b3d419b38a
|
@ -665,10 +665,10 @@ function Settings({ onClose }) {
|
|||
type="text"
|
||||
class="version-string"
|
||||
readOnly
|
||||
size="18" // Manually calculated here
|
||||
size={10 /* build time */ + (1+8) /* commit hash */ + '-dtth'.length}
|
||||
value={`${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${
|
||||
__COMMIT_HASH__ ? `.${__COMMIT_HASH__}` : ''
|
||||
}`}
|
||||
__COMMIT_HASH__ ? `.${__COMMIT_HASH__.slice(0, 8)}` : ''
|
||||
}-dtth`}
|
||||
onClick={(e) => {
|
||||
e.target.select();
|
||||
// Copy to clipboard
|
||||
|
|
|
@ -24,8 +24,12 @@ try {
|
|||
} catch (error) {
|
||||
// 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 🤞
|
||||
commitHash = uid();
|
||||
fakeCommitHash = true;
|
||||
if (process.env.PHANPY_COMMIT_HASH) {
|
||||
commitHash = process.env.PHANPY_COMMIT_HASH;
|
||||
} else {
|
||||
commitHash = uid();
|
||||
fakeCommitHash = true;
|
||||
}
|
||||
}
|
||||
|
||||
const rollbarCode = fs.readFileSync(
|
||||
|
|
Loading…
Reference in a new issue