Warn in pub publish
if git status
is not clean
#2040
Labels
good first issue
A good starting issue for contributors (issues with this label will appear in /contribute)
type-enhancement
A request for a change that isn't a bug
Splitting this off from some discussion on flutter/flutter#27258. When we're publishing a package, it's possible to have build artifacts or other untracked/ignored files in the local directory of the package. But by default we only ever want to publish files that are already tracked and committed in git.
pub publish
does spit out a tree of all the files its planning on publishing already, but in practice this isn't really useful for us since there's so many files in a typical package.It would be helpful for us if there was a flag or setting where we could tell pub that we're trying to use git as our source of truth, and have it at a bare minimum panic and throw up a warning if the
git status
isn't clean and/or it's about to upload files that aren't already committed in the source tree.The text was updated successfully, but these errors were encountered: