diff --git a/packages/next-deploy-notifications/src/api/has-new-deploy.ts b/packages/next-deploy-notifications/src/api/has-new-deploy.ts index 6f571e8..9575de3 100644 --- a/packages/next-deploy-notifications/src/api/has-new-deploy.ts +++ b/packages/next-deploy-notifications/src/api/has-new-deploy.ts @@ -21,6 +21,9 @@ let findGitRoot = (path = __dirname): string | false => { let isVercel: IsEnvironment = () => !!process.env.VERCEL; let getVercelVersion: GetVersion = () => `${process.env.VERCEL_GIT_COMMIT_SHA}`; +let isRender: IsEnvironment = () => !!process.env.RENDER; +let getRenderVersion: GetVersion = () => `${process.env.RENDER_GIT_COMMIT}`; + let isGit: IsEnvironment = () => !!findGitRoot(); let getGitVersion: GetVersion = async () => { let root = findGitRoot(); @@ -60,6 +63,8 @@ let makeRouteHandler = (options: Options = {}): Handler => { ? options.version() : isVercel() ? getVercelVersion() + : isRender() + ? getRenderVersion() : isGit() ? getGitVersion() : getUnknownVersion(); diff --git a/packages/next-deploy-notifications/vite.config.ts b/packages/next-deploy-notifications/vite.config.ts index c41efe2..61af872 100644 --- a/packages/next-deploy-notifications/vite.config.ts +++ b/packages/next-deploy-notifications/vite.config.ts @@ -21,6 +21,8 @@ export default defineConfig({ define: { "process.env.VERCEL": "process.env.VERCEL", "process.env.VERCEL_GIT_COMMIT_SHA": "process.env.VERCEL_GIT_COMMIT_SHA", + "process.env.RENDER": "process.env.RENDER", + "process.env.RENDER_GIT_COMMIT": "process.env.RENDER_GIT_COMMIT", }, build: { lib: {