Git the Agaric Way: using shell scripts to add and update projects
Update: Forget it. Complication outweighs benefits.
Note: Before you start doing any of this, you would need to copy Agaric's git directory structure-- note that this is not a single git repository, but many git repositories. More on that elsewhere, this is about using the system properly set up.
What finally works:
Navigate to the pseudo-repository's sites directory:
cd /RCS/git/agaric-sites/
Ebony-II:agaric-sites ben$ git-new-site.sh 5 test
Initialized empty Git repository in /RCS/git/agaric-sites/test/.git/Copy of Drupal 5 complete. Use 'cd test' to get in there!
To use git-drupal-5-module.sh to add a module, run it from the modules directory in the sites directory to which you want to add the module. For example, 'cd test/sites/all/modules'
If you want any modules, go get them:
Ebony-II:agaric-sites ben$ cd test/sites/all/modules/
Ebony-II:modules ben$ git-drupal-5-module.sh coder
Initialized empty Git repository in /RCS/git/agaric-sites/test/sites/all/modules/coder/.git/
Created commit d1bae26: coder module installed as submodule
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 .gitmodules
create mode 160000 sites/all/modules/coder
Clone it to the server / directory for the test site:
cd /Applications/MAMP/htdocs
Ebony-II:htdocs ben$ git clone /RCS/git/agaric-sites/test
Initialized empty Git repository in /Applications/MAMP/htdocs/test/.git/
Ebony-II:htdocs ben$ cd test/
Ebony-II:test ben$ git submodule init
Submodule 'sites/all/modules/coder' (/RCS/git/agaric-modules/coder/.git) registered for path 'sites/all/modules/coder'
Ebony-II:test ben$ git submodule update
Initialized empty Git repository in /Applications/MAMP/htdocs/test/sites/all/modules/coder/.git/
Submodule path 'sites/all/modules/coder': checked out 'd1ba7d60a069f65edc8a9287dc17f4b0395dd42b'
Adding a module that does not exist on Drupal.org to the repository
If that module is for instance related_content, in development but not committed to Drupal.org:
Put the module in /RCS/git/agaric-modules, and then:
cd /RCS/git/agaric-modules/related_content
git init
git add .
git commit -a -m "Related content development version import"
Tagging it is optional.
You can then proceed to add the module to a site the same as ever (from the directory you would like to import into in the agaric-sites site, usually sites/all/modules, with git-drupal-5-module.sh related_content
.
Note that copies (clones) of all Drupal.org downloaded modules are also stored in agaric-modules, where we can make local modifications to them.
Comments
Post new comment