From 300adb88540bf88807d0d2db3f1582dadc8691b2 Mon Sep 17 00:00:00 2001 From: Simek Date: Mon, 16 Dec 2024 12:58:48 +0100 Subject: [PATCH] alter check nv instead --- .github/workflows/deploy.yml | 4 +--- packages/styleguide-icons/check-env.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bba926a8..38804cc2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,7 @@ env: NODE_ENV: production VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + FILE_ID: zHeGLN45wIgf39kqdvKpoj on: push: @@ -32,9 +33,6 @@ jobs: run: yarn install --immutable - name: 🚨 Lint code run: yarn lint --max-warnings 0 - - name: 🔧 Prepare icons fetch - working-directory: packages/styleguide-icons - run: echo "FILE_ID=zHeGLN45wIgf39kqdvKpoj" >> .env - name: 📦️ Build packages env: FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} diff --git a/packages/styleguide-icons/check-env.sh b/packages/styleguide-icons/check-env.sh index 8be31e95..3f4705e1 100644 --- a/packages/styleguide-icons/check-env.sh +++ b/packages/styleguide-icons/check-env.sh @@ -1,6 +1,12 @@ -if [ ! -f ./.env ]; then - echo "⚠️ You do not have packages/styleguide-icons/.env file. Please create it from packages/styleguide-icons/.env.example and fill it with your credentials. Instead, bundling a stub for @expo/stylguide-icons that is empty. Read the README.md in packages/styleguide-icons to build the iconset." +if [ -z "${FIGMA_TOKEN}" ] && [ ! -f ./.env ]; then + echo "⚠️ You do not have packages/styleguide-icons/.env file or correct environment variables set. + +Please create it from packages/styleguide-icons/.env.example and fill it with your credentials. + +Instead, bundling a stub for @expo/styleguide-icons that is empty. +Read the README.md in packages/styleguide-icons to build the icon set. +" yarn build-stub && exit 0 else yarn build-icons && exit 0 -fi \ No newline at end of file +fi