Thread Tools Display Modes
06/26/15, 03:18 AM   #1
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
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
  Reply With Quote
06/26/15, 03:48 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
You are lazy indeed. I was removing the intetlliJ files manually before zipping them
But the idea is nice and if there is an automatic possibility I can get lazy too
  Reply With Quote
06/26/15, 03:55 AM   #3
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Originally Posted by Baertram View Post
... I can get lazy too
#letsgetlazy
  Reply With Quote
06/26/15, 04:07 AM   #4
XanDDemoX
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 28
Originally Posted by DerBombo View Post
#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

Last edited by XanDDemoX : 06/26/15 at 04:24 AM.
  Reply With Quote
06/26/15, 04:55 AM   #5
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Originally Posted by XanDDemoX View Post
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.
  Reply With Quote
06/26/15, 05:20 AM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
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)
  Reply With Quote
06/26/15, 06:31 AM   #7
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
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?
  Reply With Quote
06/26/15, 02:05 PM   #8
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
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
  Reply With Quote
06/26/15, 03:09 PM   #9
mctaylor
 
mctaylor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 21
Originally Posted by merlight View Post
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.
  Reply With Quote
06/26/15, 05:31 PM   #10
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Originally Posted by mctaylor View Post
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.

Originally Posted by merlight View Post
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!
  Reply With Quote
06/27/15, 05:03 PM   #11
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
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).
  Reply With Quote

ESOUI » Site Forums » Site help, bugs, suggestions/questions » git/Make Zip: Possibility to exclude files


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off