Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Case

Manav Rathibd627a6e54cc
diff --git a/web/packages/next/log-web.ts b/web/packages/next/log-web.ts
index 5b809875c1..bf24741b09 100644
--- a/web/packages/next/log-web.ts
+++ b/web/packages/next/log-web.ts
@@ -11,7 +11,7 @@ import type { AppName } from "./types/app";
* @param userId The uid for the currently logged in user, if any.
*/
export const logStartupBanner = (appName: AppName, userId?: number) => {
- const sha = process.env.GIT_SHA;
+ const sha = process.env.gitSHA;
const buildId = isDevBuild ? "dev " : sha ? `git ${sha} ` : "";
log.info(`Starting ente-${appName}-web ${buildId}uid ${userId ?? 0}`);
};
diff --git a/web/packages/next/next.config.base.js b/web/packages/next/next.config.base.js
index ce1005e11b..b658089e11 100644
--- a/web/packages/next/next.config.base.js
+++ b/web/packages/next/next.config.base.js
@@ -17,7 +17,7 @@ const path = require("path");
/**
* Return the current commit ID if we're running inside a git repository.
*/
-const gitSHA = () => {
+const gitSHA = (() => {
// Allow the command to fail. gitSHA will be an empty string in such cases.
// This allows us to run the build even when we're outside of a git context.
//
@@ -38,7 +38,7 @@ const gitSHA = () => {
// Convert empty strings (e.g. when the `|| true` part of the above execSync
// comes into play) to undefined.
return result ? result : undefined;
-};
+})();
/**
* The name of the Ente app we're building.
@@ -79,9 +79,9 @@ const nextConfig = {
transpilePackages: ["@/next", "@/utils", "@/new"],
// Add environment variables to the JavaScript bundle. They will be
- // available as `process.env.VAR_NAME` to our code.
+ // available as `process.env.varName` to our code.
env: {
- GIT_SHA: gitSHA(),
+ gitSHA,
appName,
isDesktop,
},