Skip to content

Commit

Permalink
[Issue-2097] Support webapp-dev as production branch
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Oct 30, 2023
1 parent a518442 commit 5d6c6c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/extension-base/src/utils/fetchStaticData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

import axios from 'axios';

const PRODUCTION_BRANCHES = ['master', 'webapp', 'webapp-dev'];
const branchName = process.env.BRANCH_NAME || 'koni-dev';
const fetchTarget = (branchName === 'master' || branchName === 'webapp') ? 'list.json' : 'preview.json';
const fetchTarget = PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'list.json' : 'preview.json';

export async function fetchStaticData<T> (slug: string, targetFile?: string) {
const fetchFile = targetFile || fetchTarget;
Expand Down

0 comments on commit 5d6c6c6

Please sign in to comment.