-
Notifications
You must be signed in to change notification settings - Fork 226
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
Publish an ignored file to Pub #2222
Comments
There is no workaround at this point. My suggestion would be to check the generated code into source control. It's ugly, but it also means that you only have to re-generate the files when the input change. It makes it easier for new developers joining your project. That said, this is something we could solve with a |
@jonasfj, thanks for the suggestion. For now, I'll stick to the workaround of copying the required source files into a separate directory and publishing from there. With a little scripting, it's a pretty robust approach. Though, if this feature is implemented in future, I will most certainly use it. |
Note that within the Dart team we always track all published files in git. We also tag commits with the version number when we publish. This means that we can visit the git repo and see exactly what is published for a given version without downloading the archiver from pub to see the source files. |
@natebosch, yeah, I think that's a good answer to this problem. |
…nt the publish to be sucessful, see dart-lang/pub#2222
For more information, see dart-lang/pub#2222
I'm trying to publish my first Pub package.
The doc states that the files under
.gitignore
are not published.My question is: is there a way to work around the
.gitignore
and publish the files which are not on Git?Background: I'm working with code generation and generating Dart from Protobuf. It's not ideal to store generated sources in Git (it looks ugly and distorts the viewers from the real source code which implements some logic).
I can always copy the required files into a separate directory and publish from there instead. However, it'be nice to avoid that.
However, the coupling between Git and Pub seems a bit odd. I'm sure that a reverse situation (when something is on Git and should now be published to Pub) is even more common.
The text was updated successfully, but these errors were encountered: