Case
This commit is contained in:
@@ -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}`);
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user