Closed mike-lawrence closed 2 years ago
The script archives starting from repo's root, -C
is here to avoid cd
-ing so you can archive /your/repo/path from ~/. Using git-archive-all
's CLI alone you cannot have my_repo/app
instead of app
.
I can suggest two solutions:
tar.*
and --strip-component
GitArchiver
and modify it as neededYou should be able to exclude make_app_zip.sh
from the resulting archive: cd repo; echo "make_app_zip.sh export-ignore" >> .gitattributes
. You can exclude as many files as you want, see https://git-scm.com/docs/gitattributes#_export_ignore
Very possibly I'm starting from a usage that is non-standard and there's a better way for me to do this, but I have a repo with the file structure:
Where I have the core code of the repo in the
app
folder and a shell script that calls git-archive-all at the root of of the repo. I'd like to be able to have a zip where the app folder forms the root of the zip and I've tried both:and
in that shell script, but both seem to yield a zip that has grabbed everything from the repo root down, including the zip shell and the app folder as a subfolder (rather than just the app folder as the root of the zip).
Any suggestions?