Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codesandbox): Prevent building twice #872

Merged
merged 1 commit into from
Jul 29, 2021
Merged

Conversation

tlgimenes
Copy link
Contributor

What's the purpose of this pull request?

Prevent codesandbox bot to build the packages twice

How it works?

Basically, Codesandbox's bot does the following commands:

lerna run build && lerna exec pack

The first command runs the build script for each package, whereas the second packs the built packages into a tarball.
The problem with this approach is that while running pack, npm calls the prepare script. The prepare script was running yarn build, which rebuilt all packages again. This lead to longer than necessary build times in codesandbox CI and also caused inconsistencies since the pack command was run in parallel, not respecting the package's inter dependencies. This PR solves this problem by removing all prepare scripts. This is ok because our workflow on github actions do not use the prepare and runs build too.

How to test it?

Make sure codesandbox CI is working as intended

@tlgimenes tlgimenes requested a review from a team as a code owner July 28, 2021 21:04
@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ Deploy Preview for storeui ready!

🔨 Explore the source changes: 6b9839f

🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/6101c6650a85140007895b40

😎 Browse the preview: https://deploy-preview-872--storeui.netlify.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6b9839f:

Sandbox Source
Store UI Typescript Configuration

@tlgimenes tlgimenes added the enhancement New feature or request label Jul 29, 2021
@tlgimenes tlgimenes merged commit 6a4cd89 into master Jul 29, 2021
@tlgimenes tlgimenes deleted the fix/codesandbox-bot branch July 29, 2021 17:38
Gmantiqueira pushed a commit that referenced this pull request Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants