Skip to content

Commit

Permalink
dev-config.sh: install developer tools
Browse files Browse the repository at this point in the history
  • Loading branch information
semseysandor committed May 23, 2024
1 parent 709a609 commit b18a2a5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Currently only Ubuntu is supported.
After installation, CiviCRM is ready to use (mostly in a CI environment).
However if you plan to use it for development, there are several utility scripts to help work:

- `bin/dev-config.sh`: Configure CiviCRM for development.
- `bin/dev-config.sh`: Configure CiviCRM for development. Install some development tools.

```
dev-config.sh [INSTALL_DIR]
Expand Down
18 changes: 18 additions & 0 deletions bin/dev-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ install_dir="${1:-${base_dir}}"
install_dir=$(realpath "${install_dir}")
cv_params=(--no-interaction "--cwd=${install_dir}")

print-status Install developer tools...
tmp_file=$(mktemp)
curl -LsS -o "${tmp_file}" "${url_php_cs_fixer}"
echo "${sha_php_cs_fixer} ${tmp_file}" | sha256sum --check --strict -
sudo cp "${tmp_file}" "${local_bin}/php-cs-fixer"
sudo curl -LsS -o "${local_bin}/civix" "${url_civix}"
sudo curl -LsS -o "${local_bin}/civistrings" "${url_civistrings}"
sudo chmod +x "${local_bin}/php-cs-fixer"
sudo chmod +x "${local_bin}/civix"
sudo chmod +x "${local_bin}/civistrings"
print-finish

print-header Verify developer tools version...
php-cs-fixer --version
civix --version
civistrings --version
print-finish

print-status Update civicrm.settings.php...
sed -i \
-e "/(\!defined('CIVICRM_TEMPLATE_COMPILE_CHECK'))/,+2 s@^//@@" \
Expand Down
7 changes: 7 additions & 0 deletions cfg/install.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ url_composer=https://getcomposer.org/download/2.7.6/composer.phar
sha_composer=29dc9a19ef33535db061b31180b2a833a7cf8d2cf4145b33a2f83504877bba08
# CV url
url_cv=https://download.civicrm.org/cv/cv.phar
# civix url
url_civix=https://download.civicrm.org/civix/civix.phar
# civistrings url
url_civistrings=https://download.civicrm.org/civistrings/civistrings.phar
# php-cs-fixer url
url_php_cs_fixer=https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.38.2/php-cs-fixer.phar
sha_php_cs_fixer=cb839aee98c0f8928a5449a921c3e70b5b3fea3f15cda5e8f736da32a6b99ddd

## CiviCRM
##########
Expand Down

0 comments on commit b18a2a5

Please sign in to comment.