mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix: trim git info (#1746)
This commit is contained in:
@@ -27,15 +27,10 @@ const getGitVersion = () => {
|
||||
);
|
||||
return null;
|
||||
}
|
||||
const VERSION = execSync('git describe --always --dirty')
|
||||
.toString()
|
||||
// remove empty line
|
||||
.replace(/[\s\r\n]+$/, '');
|
||||
|
||||
return VERSION;
|
||||
return execSync('git describe --always --dirty').toString().trimEnd();
|
||||
};
|
||||
|
||||
const getCommitHash = (rev = 'HEAD') =>
|
||||
execSync(`git rev-parse --short ${rev}`).toString();
|
||||
execSync(`git rev-parse --short ${rev}`).toString().trimEnd();
|
||||
|
||||
export { getCommitHash, getGitVersion };
|
||||
|
||||
Reference in New Issue
Block a user