Merge pull request #872 from ente-io/dev-deployment-true-for-test-release
testing setup
This commit is contained in:
commit
8f150a3788
|
@ -36,6 +36,7 @@ module.exports = (phase) =>
|
|||
},
|
||||
env: {
|
||||
SENTRY_RELEASE: GIT_SHA,
|
||||
NEXT_PUBLIC_IS_TEST_APP: process.env.IS_TEST_RELEASE,
|
||||
},
|
||||
|
||||
headers() {
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
import { getData, LS_KEYS } from 'utils/storage/localStorage';
|
||||
import { runningInBrowser } from '.';
|
||||
|
||||
export const getEndpoint = () => {
|
||||
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
|
||||
let endpoint = getData(LS_KEYS.API_ENDPOINT);
|
||||
if (endpoint) {
|
||||
return endpoint;
|
||||
}
|
||||
endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
|
||||
if (isDevDeployment() && endpoint) {
|
||||
return endpoint;
|
||||
}
|
||||
|
@ -91,6 +96,7 @@ const isDevDeployment = () => {
|
|||
window.location.origin ||
|
||||
process.env.NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT ===
|
||||
window.location.origin ||
|
||||
process.env.NEXT_PUBLIC_IS_TEST_APP === 'true' ||
|
||||
process.env.NODE_ENV === 'development'
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ export enum LS_KEYS {
|
|||
USER_DETAILS = 'userDetails',
|
||||
COLLECTION_SORT_BY = 'collectionSortBy',
|
||||
THEME = 'theme',
|
||||
API_ENDPOINT = 'apiEndpoint',
|
||||
}
|
||||
|
||||
export const setData = (key: LS_KEYS, value: object) => {
|
||||
|
|
Loading…
Reference in a new issue