Merge pull request #10009 from seanmadsen/CRM-20046
[civicrm-core.git] / distmaker / dists / common.sh
index 26aeb13d6c65f1c171eb8f9af759f529c5846252..23f75d844e53be3a7590003ac4be7ac5d5287537 100644 (file)
@@ -65,12 +65,12 @@ 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 ; do
+  for dir in ang css i js PEAR templates bin CRM api extern Reports install settings Civi partials release-notes ; do
     [ -d "$repo/$dir" ] && dm_install_dir "$repo/$dir" "$to/$dir"
   done
 
-  dm_install_files "$repo" "$to" {agpl-3.0,agpl-3.0.exception,gpl,README,CONTRIBUTORS}.txt
-  dm_install_files "$repo" "$to" composer.json composer.lock bower.json package.json Civi.php
+  dm_install_files "$repo" "$to" {agpl-3.0,agpl-3.0.exception,gpl,CONTRIBUTORS}.txt
+  dm_install_files "$repo" "$to" composer.json composer.lock bower.json package.json Civi.php README.md release-notes.md
 
   mkdir -p "$to/sql"
   pushd "$repo" >> /dev/null
@@ -116,15 +116,15 @@ function dm_install_drupal() {
   local to="$2"
   dm_install_dir "$repo" "$to"
 
-  # set full version in .info files
+  # Set full version in .info files. See CRM-15768.
   local MODULE_DIRS=`find "$to" -type f -name "*.info"`
   for INFO in $MODULE_DIRS; do
     if [ $(uname) = "Darwin" ]; then
       ## BSD sed
-      sed -i '' "s/version = [1-9.]*/version = $DM_VERSION/g" $INFO
+      sed -i '' "s/version = \([0-9]*\.x-\)[1-9.]*/version = \1$DM_VERSION/g" $INFO
     else
       ## GNU sed
-      sed -i'' "s/version = [1-9.]*/version = $DM_VERSION/g" $INFO
+      sed -i'' "s/version = \([0-9]*\.x-\)[1-9.]*/version = \1$DM_VERSION/g" $INFO
     fi
   done