Skip to content

mallezie/civicrm-buildkit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

civicrm-buildkit

Buildkit is a collection of ~20 tools for developing and testing CiviCRM. These tools are referenced in the CiviCRM developer documentation.

Many of these tools are commonly used by web developers, so you may have already installed a few. Even so, it's generally easier to download the full collection -- installing each individually takes a lot of work.

This is the same collection of tools which manages the test/demo/release infrastructure for civicrm.org.

System Requirements

Download: Option #1: Full Stack Ubuntu

If you have a new installation of Ubuntu 12.04 or 14.04, then you can download everything -- buildkit and the system requirements (git, php, apache, mysql, etc) -- with one command. This command will install buildkit to ~/buildkit:

curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit

Note:

  • When executing the above command, you should not run as root. However, you should have sudo permissions.
  • The --full option is opinionated; it specifically installs php, apache, and mysql (rather than hvm, nginx, lighttpd, or percona). If you try to mix --full with alternative systems, then expect conflicts.

Download: Option #2: Other Systems

If you already installed the system requirements (git, php, etc or equivalents), then you can download buildkit to ~/buildkit with these commands:

git clone https://github.com/civicrm/civicrm-buildkit.git ~/buildkit
cd ~/buildkit
./bin/civi-download-tools

Download: Option #3: Upgrade

If you have previously downloaded buildkit and want to update it, run:

cd ~/buildkit
git pull
./bin/civi-download-tools

CLI Setup: Option #1: Persistent

It is useful to register buildkit in the PATH. This enables you to run commands by entering a name (e.g. civix) rather than a full path (e.g. /path/to/buildkit/bin/civix).

If you want to ensure that these CLI tools are always available, then:

  1. Determine the location of your shell configuration file. This is usually ~/.bashrc, ~/.bash_profile, or ~/.profile.
  2. At the end of the file, add export PATH="/path/to/buildkit/bin:$PATH" (with proper adjustments to match your local system).
  3. Close and reopen the terminal.
  4. Enter the command which civibuild. This should display a full-path. If nothing appears, then retry the steps.

CLI Setup: Option #2: Temporary

Alternatively, if you're just getting started, or if you worry about conflicts between buildkit and your existing tools, then you can register buildkit in the PATH temporarily. Simply adapt and run the export command directly in the terminal:

export PATH=/path/to/buildkit/bin:$PATH

You can restore the normal environment by closing the terminal and opening a new one.

Each time you open a new terminal while working on Civi development, you would need to re-run the export command.

CLI Tools

  • CiviCRM
    • civix - Generate skeletal code for CiviCRM extensions.
    • civistrings - Scan code for translatable strings (*.pot).
    • cividist - Generate nightly tarballs from a series of git branches/tags
  • Dependency management
    • composer - Manage dependencies for PHP code.
    • bower - Manage dependencies for Javascript code.
  • Source code management
    • git-scan - Manage a large number of git repositories.
    • gitify - Convert a CiviCRM installation to a git repo.
    • hub - Send commands to github.com (Note: Requires Ruby/Rake).
  • Source code quality
  • Site management
    • amp - Abstracted interface for local httpd/sql service (Apache/nginx/MySQL).
    • civibuild - Build a complete source tree (with CMS+Civi+addons), provision httpd/sql, etc.
    • drush - Administer a Drupal site.
    • joomla (joomla-console) - Administer a Joomla site.
    • wp (wp-cli) - Administer a WordPress site.
  • Testing

Documentation

About

A collection of tools for developing and testing CiviCRM.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 66.1%
  • PHP 26.9%
  • Ruby 6.9%
  • Elixir 0.1%