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

feat(publish): clear built files before building package and packing #12516

Merged
merged 2 commits into from
Jun 24, 2019

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Mar 12, 2019

This adds extra step before publishing to clear any previously built files.

Initially I added prompt to confirm file deletion just in case script need to be adjusted and problems can be caught

Example output:
https://gist.github.com/pieh/1ebb938eb300aaac882491bd94a3506f

Btw - this also catch some weirdness in our package build scripts - like graphql-skip-limit packs both src and dist, or testfixtures being packed in gatsby-codemods

Closes #12491

Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments--looking good!

Also my comments on _verbose can be ignored if there's a reason--just didn't know why to prefix with an underscore?

scripts/clear-package-dir.js Outdated Show resolved Hide resolved
scripts/clear-package-dir.js Outdated Show resolved Hide resolved
scripts/clear-package-dir.js Outdated Show resolved Hide resolved
scripts/clear-package-dir.js Outdated Show resolved Hide resolved
scripts/clear-package-dir.js Outdated Show resolved Hide resolved
@pieh
Copy link
Contributor Author

pieh commented May 20, 2019

I'll close this is this has potential for problems and comment what I think is more straight forward solution in issue

@pieh pieh closed this May 20, 2019
@pieh
Copy link
Contributor Author

pieh commented May 20, 2019

Argh, my bad, solution I thought of is not really possible (just output built files to lib/dist and rimraf it on builds - as gatsby-X.js files need to be in root of package), so reopening this...

@pieh pieh reopened this May 20, 2019
@wardpeet
Copy link
Contributor

Any updates on this @pieh?

@wardpeet wardpeet added the status: awaiting author response Additional information has been requested from the author label Jun 24, 2019
@pieh
Copy link
Contributor Author

pieh commented Jun 24, 2019

No updates on this yet, let me sync this branch and address Dustin's comments. And should be good to go I think

@pieh pieh requested a review from a team as a code owner June 24, 2019 10:50
@pieh pieh force-pushed the clear-packages-before-publishing branch 2 times, most recently from df88676 to 10b0571 Compare June 24, 2019 11:44
@pieh
Copy link
Contributor Author

pieh commented Jun 24, 2019

All right, updated the PR and is ready for review

@pieh pieh added status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response and removed status: WIP status: awaiting author response Additional information has been requested from the author labels Jun 24, 2019
@freiksenet freiksenet added bot: merge on green Gatsbot will merge these PRs automatically when all tests passes and removed status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response labels Jun 24, 2019
@gatsbybot gatsbybot merged commit 2c64d75 into gatsbyjs:master Jun 24, 2019
johno pushed a commit to johno/gatsby that referenced this pull request Jul 17, 2019
…atsbyjs#12516)

* feat(publish): clear built files before building package and packing

* Add some feedback message if dev doesn't confirm file deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix]: run git clean before publishing
5 participants