Merge pull request #11962 from compucorp/55-hide-adding-option-value-for-locked-groups
[civicrm-core.git] / distmaker / dists / common.sh
index 922c10dea6ff23a68c06b613d455d127ac41ee2c..e760bf593054d3dd6b2269a706e7fb2e216c950b 100644 (file)
@@ -65,7 +65,7 @@ function dm_install_core() {
   local repo="$1"
   local to="$2"
 
-  for dir in ang css i js PEAR templates bin CRM api extern Reports install settings Civi partials release-notes ; do
+  for dir in ang css i js PEAR templates bin CRM api extern Reports install settings Civi partials release-notes xml ; do
     [ -d "$repo/$dir" ] && dm_install_dir "$repo/$dir" "$to/$dir"
   done
 
@@ -162,7 +162,8 @@ function dm_install_vendor() {
   local to="$2"
 
   local excludes_rsync=""
-  for exclude in .git .svn {T,t}est{,s} {D,d}oc{,s} {E,e}xample{,s} ; do
+  ## CRM-21729 - .idea test-cases unit-test come from phpquery package.
+  for exclude in .git .svn {T,t}est{,s} {D,d}oc{,s} {E,e}xample{,s} .idea test-cases unit-test; do
     excludes_rsync="--exclude=${exclude} ${excludes_rsync}"
   done
 
@@ -219,6 +220,7 @@ function dm_generate_version() {
 
   # final touch
   echo "<?php
+/** @deprecated */
 function civicrmVersion( ) {
   return array( 'version'  => '$DM_VERSION',
                 'cms'      => '$ufname',
@@ -236,6 +238,13 @@ function dm_git_checkout() {
   popd
 }
 
+## Download a Civi extension
+## usage: dm_install_cvext <full-ext-key> <target-path>
+function dm_install_cvext() {
+  # cv dl -b '@https://civicrm.org/extdir/ver=4.7.25|cms=Drupal/com.iatspayments.civicrm.xml' --destination=$PWD/iatspayments
+  cv dl -b "@https://civicrm.org/extdir/ver=$DM_VERSION|cms=Drupal/$1.xml" --to="$2"
+}
+
 ## Edit a file by applying a regular expression.
 ## Note: We'd rather just call "sed", but it differs on GNU+BSD.
 ## usage: dm_preg_edit <search-pattern> <replacement-pattern> <file>