This is a dependency repository that stores all helper scripts for infrastructure that all Magen components depend on.
Instructions:
- helper_scripts should be [chmod +x]
- remove entry lib/ from .gitignore of the repo you'd like to add Magen-Helper to
You can add magen-helper submodule with command:
git submodule add https://github.com/magengit/magen-helper.git lib/magen_helper
This will create folder /lib/magen_helper and .gitmodules file
Note: you can use -b flag to add submodule from a specific branch.
By default after adding submodule it has up-to-date code under master branch.
You may have more then 1 submodule
Here is example of .gitmodules file. You can manually edit it to change settings:
[submodule "lib/magen_helper"]
path = lib/magen_helper
url = https://github.com/magengit/magen-helper.gitTo update dependencies (submodules) to the latest commit you may:
- do
git pullinside the submodule directory (ex. lib/magen_helper/) - execute the following command for all submodules:
git submodule foreach git pull origin {remote_submodule_branch}(by default master is used) - run
make updateto automatically update submodules
When cloning as usual: git clone {path_to_the_repo} the lib/{submodule_name} will be created automatically but will be left empty until initialized and updated.
When cloning a repo that contains submodule you may:
- do
git submodule init && git submodule updatein the submodule directory - clone the whole repo recursively:
git clone --recursive {path_to_the_repo} - run command
git submodule update --init --recursiveNote: Travis will run this command automatically by default, but you have to provide access rights to Travis for the submodule - run
make initto automatically initialize submodules