Skip to content

Instantly share code, notes, and snippets.

@csalzano
Created December 3, 2020 15:52
Show Gist options
  • Save csalzano/f54d5d32405fc3cdc5f40addef0c7649 to your computer and use it in GitHub Desktop.
Save csalzano/f54d5d32405fc3cdc5f40addef0c7649 to your computer and use it in GitHub Desktop.
Zips a directory while excluding .git, node_modules, and .gitingore
::plugin-zipper.bat
::Zips a directory while excluding .git, node_modules, and .gitingore
@echo off
set /p slug=Please enter a directory name/plugin slug:
If /I "%slug%"=="" goto earlyexit
tar -a -c -f "%slug%".zip --exclude ".git" --exclude ".gitignore" --exclude "node_modules" "%slug%"
:earlyexit
@csalzano
Copy link
Author

csalzano commented Dec 8, 2021

Using git archive could make this platform agnostic https://stackoverflow.com/a/28357990/338432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment