ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Site help, bugs, suggestions/questions (https://www.esoui.com/forums/forumdisplay.php?f=18)
-   -   git/Make Zip: Possibility to exclude files (https://www.esoui.com/forums/showthread.php?t=4835)

DerBombo 06/26/15 03:18 AM

git/Make Zip: Possibility to exclude files
 
Hey guys and gals,

I don't really know, where the right place would be to ask for this, so I just try it here. :)

As I recently decided to develop my addon with IntelliJ, I needed to add some project files to the git repository. Of course they should be persisted and shared, so I can just clone anywhere and start working.

I am a really big fan of the "Make Zip" functionality in the Git Control Panel. Sadly though, the resulting package would contain all those meta files, which are in no way needed in every player's addon folder. My solution at the moment would be to generate the Zip file on my own again and upload it the old way. That would be quite a bummer though.

So my question is: Could there be a way to add some kind of exclude/ignore functionality to this feature? Maybe via an additional section in the dialog, where one could check off files, which are should not be included. Or maybe just look for an ignore file of some kind (zamignore.txt) which would contain files and folders, which should be excluded in general?

Thanks for any feedback/replies on this. Maybe I'm just a lazy diva. :)

-Boris

Baertram 06/26/15 03:48 AM

You are lazy indeed. I was removing the intetlliJ files manually before zipping them :D
But the idea is nice and if there is an automatic possibility I can get lazy too :banana:

DerBombo 06/26/15 03:55 AM

Quote:

Originally Posted by Baertram (Post 21736)
... I can get lazy too :banana:

#letsgetlazy :)

XanDDemoX 06/26/15 04:07 AM

Quote:

Originally Posted by DerBombo (Post 21737)
#letsgetlazy :)

You could set yourself up with TeamCity (also by JetBrains) and have a build step to generate a zip :)

Edit: or just script it with something like bash, powershell etc or C# Script

Edit 2: Also Git make zip just zips the entire branch so I don't think its intended to have files excluded :)

DerBombo 06/26/15 04:55 AM

Quote:

Originally Posted by XanDDemoX (Post 21738)
Also Git make zip just zips the entire branch so I don't think its intended to have files excluded :)

Yeah, sure, but that's exactly my point. Would just be a nice feature for it. I really like that functionality and now that I get a bit more sophisticated with my addon development, I can't (or won't) use it anymore. Just makes me a bit sad.

It's really not that hard to build the zip file myself though, so it's not that big of a deal. Just want that feature to stay useful.

merlight 06/26/15 05:20 AM

git-archive is a built-in command to create archive, you can use it to create the zip locally, no need to download it from github.

It also allows you to exclude files/directories via gitattributes

Just create a .gitattributes file:
Code:

UnwantedDir/ export-ignore
SomeDir/UnwantedFile.txt export-ignore
# etc.

Code:

git archive --prefix ABC/ -o ABC.zip COMMIT
(note that if the .gitattributes file is not present in COMMIT, you will need to add --worktree-attributes option)

DerBombo 06/26/15 06:31 AM

Okay, so to be a bit more clear on this matter: I am not using github but the integrated git here on esoui.com. When doing so, there is a convencience method to create a new zip file, modify addon information as version, description, and changelog, and publish said zip file from within a nice little wizard directly on this page.

That being sad: Is there the possibility of esoui.com using git-archive to create the zip file (would make sense), so I'd just have to sneak in the .gitattributes file and everything could already work? I will try that out later for sure, though maybe someone has already some insight here?

merlight 06/26/15 02:05 PM

Ah, I wasn't reading carefully. Haven't tried that here on esoui, but as you wrote, it would make sense if it used git-archive ;)

mctaylor 06/26/15 03:09 PM

Quote:

Originally Posted by merlight (Post 21745)
Ah, I wasn't reading carefully. Haven't tried that here on esoui, but as you wrote, it would make sense if it used git-archive ;)

If so, it may support git-ignore.

DerBombo 06/26/15 05:31 PM

Quote:

Originally Posted by mctaylor (Post 21746)
If so, it may support git-ignore.

It does, but I do want the files checked-in, I just don't want them ending up in the zip package. :)

Quote:

Originally Posted by merlight (Post 21745)
Ah, I wasn't reading carefully. Haven't tried that here on esoui, but as you wrote, it would make sense if it used git-archive ;)

Well, at least just adding the .gitattributes file didn't work. Maybe I'm missing something though. I will try around a bit more at some point. Thanks anyways for your reply!

Sasky 06/27/15 05:03 PM

Yeah, pretty sure that'd have to be a new feature.

You could setup the .gitattributes as mentioned above, then add a post-commit hook to make the zip. You'd still have to manually upload it, but saves one more step.

Alternatively, you could keep those meta files on a separate branch (if it's stuff like screenshots and addon descriptions).


All times are GMT -6. The time now is 12:51 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI