eli-schwartz / aurpublish

PKGBUILD management framework for the Arch User Repository
GNU General Public License v2.0
246 stars 18 forks source link

Add built versions of aurpublish files to git ignore #31

Open stevenbenner opened 8 months ago

stevenbenner commented 8 months ago

These files were always showing up as untracked in git status while working on the aurpublish script. Since they are not meant to be committed, they should probably be included in the .gitignore list.

eli-schwartz commented 8 months ago

The current gitignore is actually kinda weird because its git origins are actually from when aurpublish was distributed inside my pkgbuilds repository, and the gitignore reflects that by containing content relevant to such.

Somewhat in parallel, there is #26 which asks for aurpublish to generate a gitignore for you...

Probably you should either delete the current contents before inserting your additions, or move them to some form of documentation-like location.

eli-schwartz commented 8 months ago

On a completely unrelated note, this is why real build systems are nice, especially out of source build directories:

https://mesonbuild.com/FAQ.html#how-do-i-ignore-the-build-directory-in-my-vcs

But it could be considered overkill to add such a dependency for a project that doesn't actually have any build time options or platform-specific behavior.

stevenbenner commented 8 months ago

[...] its git origins are actually from when aurpublish was distributed inside my pkgbuilds repository [...]

I figured it was something like that. The other stuff didn't make sense to me and mostly dates back to the initial commit. But I was hesitant to nuke it because it's generally a bad idea to delete things just because I don't understand them.

Probably you should either delete the current contents before inserting your additions, or move them to some form of documentation-like location.

Agreed. Patch updated and description reworded. I chose to delete them.

I can see an argument to be made for documenting the practice. But I think that information falls under general git knowledge or PKGBUILD/makepkg knowledge more so than aurpublish. Or at least, it is a topic that I would not expect to see documented in an aurpublish man page.

If a little hand-holding is desired then I would a agree that #26 is a good idea. If someone is totally new to this then dropping a reasonable default .gitignore file in the directory when they run aurpublish setup should make them aware of the consideration. And experts will use their own regardless.

[...] this is why real build systems are nice, especially out of source build directories [...]

Indeed. If only we had access to an expert on build systems. Perhaps some prolific contributor to one of the most popular build systems on the planet...

From a project structure standpoint, something like this traditional structure would probably be a lot cleaner:

.
├── src
│   ├── completion
│   ├── doc
│   ├── hook
│   └── aurpublish.in
└── README.md

With an ignored top-level /build/ folder where all of the processed files get dumped for easy packaging/installation.

Moving the files around and updating the makefile would be a trivial task. However that's a significant restructuring of the project. It would make it painful to land the other two pull requests if you're considering them.

But it could be considered overkill to add such a dependency [...]

Meson? Yeah, probably. It's a significant makedepends for a build process which is basically cp, sed, a2x. This project is simple enough that it's unlikely to ever run in to the real pain points of make. But it's your project, and you have a lot of experience with meson. It's clearly the right tool for you. With meson you can be confident that it is done correctly since you'd be personally approving changes.

Personally I'd rather have a slightly overkill but easy to reason about solution maintained by an expert than a trivial but obtuse solution slapped in without care and forgotten about.