Skip to content

Commit

Permalink
fix ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Jul 24, 2024
1 parent 7263592 commit 411cbf0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/rav-hen-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ permissions:
id-token: write

env:
NODE_ENV: production
LOG_LEVEL: ${{ inputs.logLevel }}

jobs:
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/local.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NODE_ENV=development
CI=false
LOG_LEVEL=debug
3 changes: 2 additions & 1 deletion packages/cli/src/config/globals/env.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import process from "node:process";
import { z } from "zod";
import { logLevelSchema } from "../../logging/types/log-level.js";

const envSchema = z.object({
// biome-ignore lint/style/useNamingConvention: env variables have different convention
NODE_ENV: z.enum(["development", "production"]).default("development"),
CI: z.coerce.boolean().default(false),
// biome-ignore lint/style/useNamingConvention: env variables have different convention
LOG_LEVEL: logLevelSchema,
});
Expand Down
7 changes: 3 additions & 4 deletions packages/cli/src/ical/utils/create-ical-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ export async function createICalCalendar(
cinemaName: string,
branchName: string,
): Promise<ICalCalendar> {
const jsonData: unknown | null =
env.NODE_ENV === "development"
? await getExistingICalCalendarFromLocalFilesystem(cinemaName, branchName)
: await getExistingICalCalendarFromRemoteHost(cinemaName, branchName);
const jsonData: unknown | null = env.CI
? await getExistingICalCalendarFromRemoteHost(cinemaName, branchName)
: await getExistingICalCalendarFromLocalFilesystem(cinemaName, branchName);

return ical(
jsonData ? (jsonData as ICalCalendarJSONData) : { name: branchName },
Expand Down

0 comments on commit 411cbf0

Please sign in to comment.