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

Ignore git submodules on publish #2255

Closed
pd4d10 opened this issue Nov 12, 2019 · 3 comments
Closed

Ignore git submodules on publish #2255

pd4d10 opened this issue Nov 12, 2019 · 3 comments

Comments

@pd4d10
Copy link

pd4d10 commented Nov 12, 2019

Environment

  • pub version or flutter pub version: 2.5.0
  • OS version: macOS 10.15
  • Are you using the Chinese community mirror or a corporate firewall? No

Problem

According to this documentation, all files version controlled by git will be published to Pub.

It there a way to ignore git submodules?

For example, in my project, the submodule(react-native-vector-icons, written in JavaScript) is only for Dart code generation. Seems it should not be published to Pub.

@jonasfj
Copy link
Member

jonasfj commented Nov 19, 2019

No, there is no support for pub-specific ignore patterns at this point.

You can make a bash script that wraps pub publish and copies everything you want to publish into a separate folder.

According to this documentation, all files version controlled by git will be published to Pub.

Close, but not quite. The documentation says that all files ignored by .gitignore will be ignored by pub publish. It will publish files in your folder that are not under git control, if they are not in your .gitignore file.

@jonasfj
Copy link
Member

jonasfj commented Nov 19, 2019

I think this is somewhat similar to: #2222

@pd4d10
Copy link
Author

pd4d10 commented Nov 20, 2019

OK, get it. Let's track this in #2222. Closing

@pd4d10 pd4d10 closed this as completed Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants