From ec28ed8e2acd9f113984de0823d831527abcea91 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 27 Mar 2020 14:31:42 +0100 Subject: [PATCH] packages/app: rename build script to bundle and only run in CI when app changed --- .github/workflows/frontend.yml | 2 ++ package.json | 1 + packages/app/package.json | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 8095106910..196cfd7541 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -43,5 +43,7 @@ jobs: - run: yarn lint - run: yarn build - run: yarn test + - name: yarn bundle, if app was changed + run: git diff --quiet origin/master HEAD -- packages/app || yarn bundle - name: verify storybook run: yarn workspace storybook build-storybook diff --git a/package.json b/package.json index eaf85f7567..f6c20e56fa 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ }, "scripts": { "start": "yarn build && yarn workspace example-app start", + "bundle": "yarn build && yarn workspace example-app bundle", "build": "lerna run build", "test": "cross-env CI=true lerna run test --since origin/master -- --coverage", "create-plugin": "backstage-cli create-plugin", diff --git a/packages/app/package.json b/packages/app/package.json index c332d2f0da..681593a369 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -26,7 +26,7 @@ }, "scripts": { "start": "backstage-cli app:serve", - "build": "backstage-cli app:build", + "bundle": "backstage-cli app:build", "test": "backstage-cli test", "test:e2e": "start-server-and-test start http://localhost:3000 cy:dev", "test:e2e:ci": "start-server-and-test start http://localhost:3000 cy:run",