Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: trim git info (#1746)

Fangdun Tsai3180d961dd16
diff --git a/apps/web/scripts/gitInfo.mjs b/apps/web/scripts/gitInfo.mjs
index 51ea7d5127..1e44da0847 100644
--- a/apps/web/scripts/gitInfo.mjs
+++ b/apps/web/scripts/gitInfo.mjs
@@ -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 };