Skip to content

armgit / ente

Public Imported from GitHub
0

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

Rename Deployment to Build

Manav Rathifc695eff75d5
diff --git a/apps/photos/.env.development b/apps/photos/.env.development
index b4aabdaf7e..a338be2202 100644
--- a/apps/photos/.env.development
+++ b/apps/photos/.env.development
@@ -29,7 +29,7 @@
#
# 2. Sentry crash reporting etc is disabled
#
-# See `isDevDeployment` for the exact rules for determining what counts as a
+# See `isDevBuild` for the exact rules for determining what counts as a
# development build.
# The ente API endpoint
diff --git a/apps/photos/src/services/userService.ts b/apps/photos/src/services/userService.ts
index acf16c5e4e..3abf393d9d 100644
--- a/apps/photos/src/services/userService.ts
+++ b/apps/photos/src/services/userService.ts
@@ -1,7 +1,7 @@
import {
getEndpoint,
getFamilyPortalURL,
- isDevDeployment,
+ isDevBuild,
} from '@ente/shared/network/api';
import { getData, LS_KEYS } from '@ente/shared/storage/localStorage';
import localForage from '@ente/shared/storage/localForage';
@@ -326,7 +326,7 @@ export async function getDisableCFUploadProxyFlag(): Promise<boolean> {
try {
const disableCFUploadProxy =
process.env.NEXT_PUBLIC_DISABLE_CF_UPLOAD_PROXY;
- if (isDevDeployment() && typeof disableCFUploadProxy !== 'undefined') {
+ if (isDevBuild() && typeof disableCFUploadProxy !== 'undefined') {
return disableCFUploadProxy === 'true';
}
const featureFlags = (
diff --git a/packages/shared/network/api.ts b/packages/shared/network/api.ts
index 39838e1b12..fbce09b49f 100644
--- a/packages/shared/network/api.ts
+++ b/packages/shared/network/api.ts
@@ -1,6 +1,6 @@
export const getEndpoint = () => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return endpoint;
}
return 'https://api.ente.io';
@@ -8,7 +8,7 @@ export const getEndpoint = () => {
export const getFileURL = (id: number) => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return `${endpoint}/files/download/${id}`;
}
return `https://files.ente.io/?fileID=${id}`;
@@ -16,7 +16,7 @@ export const getFileURL = (id: number) => {
export const getPublicCollectionFileURL = (id: number) => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return `${endpoint}/public-collection/files/download/${id}`;
}
return `https://public-albums.ente.io/download/?fileID=${id}`;
@@ -24,7 +24,7 @@ export const getPublicCollectionFileURL = (id: number) => {
export const getThumbnailURL = (id: number) => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return `${endpoint}/files/preview/${id}`;
}
return `https://thumbnails.ente.io/?fileID=${id}`;
@@ -32,7 +32,7 @@ export const getThumbnailURL = (id: number) => {
export const getPublicCollectionThumbnailURL = (id: number) => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return `${endpoint}/public-collection/files/preview/${id}`;
}
return `https://public-albums.ente.io/preview/?fileID=${id}`;
@@ -40,7 +40,7 @@ export const getPublicCollectionThumbnailURL = (id: number) => {
export const getUploadEndpoint = () => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_UPLOAD_ENDPOINT;
- if (isDevDeployment() && endpoint) {
+ if (isDevBuild() && endpoint) {
return endpoint;
}
return `https://uploader.ente.io`;
@@ -48,7 +48,7 @@ export const getUploadEndpoint = () => {
export const getPaymentsURL = () => {
const paymentsURL = process.env.NEXT_PUBLIC_ENTE_PAYMENT_ENDPOINT;
- if (isDevDeployment() && paymentsURL) {
+ if (isDevBuild() && paymentsURL) {
return paymentsURL;
}
return `https://payments.ente.io`;
@@ -56,7 +56,7 @@ export const getPaymentsURL = () => {
export const getAlbumsURL = () => {
const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT;
- if (isDevDeployment() && albumsURL) {
+ if (isDevBuild() && albumsURL) {
return albumsURL;
}
return `https://albums.ente.io`;
@@ -66,7 +66,7 @@ export const getAlbumsURL = () => {
// create or manage family.
export const getFamilyPortalURL = () => {
const familyURL = process.env.NEXT_PUBLIC_ENTE_FAMILY_PORTAL_ENDPOINT;
- if (isDevDeployment() && familyURL) {
+ if (isDevBuild() && familyURL) {
return familyURL;
}
return `https://family.ente.io`;
@@ -83,6 +83,6 @@ export const getFamilyPortalURL = () => {
* automatically assigns development when running the `next dev` command,
* or production for all other commands.
*/
-export const isDevDeployment = () => {
+export const isDevBuild = () => {
return process.env.NODE_ENV === 'development';
};