Skip to content

Commit

Permalink
Merge pull request #3 from danielmichaels/render-support
Browse files Browse the repository at this point in the history
Add support for the hosting provider Render.com
  • Loading branch information
ryanto authored Apr 4, 2022
2 parents 639d1de + e48c225 commit 843b9de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/next-deploy-notifications/src/api/has-new-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -60,6 +63,8 @@ let makeRouteHandler = (options: Options = {}): Handler => {
? options.version()
: isVercel()
? getVercelVersion()
: isRender()
? getRenderVersion()
: isGit()
? getGitVersion()
: getUnknownVersion();
Expand Down
2 changes: 2 additions & 0 deletions packages/next-deploy-notifications/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 843b9de

Please sign in to comment.