I'm in the process of setting up a deployment script. The basic process is:
The issue is my repository contains a submodule, which doesn't get put in the archive, and therefore doesn't get put in the release directory.
I've seen git-archive-all, but that doesn't work on a bare repository.
If its not possible, I'm considering,
In order to add a Git submodule, use the “git submodule add” command and specify the URL of the Git remote repository to be included as a submodule. When adding a Git submodule, your submodule will be staged. As a consequence, you will need to commit your submodule by using the “git commit” command.
It is stored in Git's object database directly. The tree object for the directory where the submodule lives will have an entry for the submodule's commit (this is the so-called "gitlink").
Pulling with submodules. Once you have set up the submodules you can update the repository with fetch/pull like you would normally do. To pull everything including the submodules, use the --recurse-submodules and the --remote parameter in the git pull command .
Git archive is a helpful utility for creating distributable packages of git repositories. Git archive can target specific refs of a repository and only package the contents of that ref. Git archive has several output formats that can utilize added compression.
I use this python package https://github.com/Kentzo/git-archive-all. You can install it by using
pip install git-archive-all
On OSX, you can install it also using brew install git-archive-all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With