Commit c84eb16e authored by totten's avatar totten

composer, distmaker - Generate and include the vendor/ folder

parent ac0b2c9c
......@@ -166,6 +166,9 @@ dm_git_checkout "$DM_SOURCEDIR/packages" "$DM_REF_PACKAGES"
## in theory, this shouldn't matter, but GenCode is CMS-dependent, and we've been doing our past builds based on D7
dm_git_checkout "$DM_SOURCEDIR/drupal" "$DM_REF_DRUPAL"
## Get latest dependencies
dm_generate_vendor "$DM_SOURCEDIR"
# Before anything - regenerate DAOs
cd $DM_SOURCEDIR/xml
......
......@@ -135,6 +135,26 @@ function dm_install_l10n() {
dm_install_dir "$repo" "$to"
}
## Copy composer's "vendor" folder
## usage: dm_install_vendor <from_path> <to_path>
function dm_install_vendor() {
local repo="$1"
local to="$2"
local excludes_rsync=""
for exclude in .git .svn {T,t}est{,s} {D,d}oc{,s} {E,e}xample{,s} ; do
excludes_rsync="--exclude=${exclude} ${excludes_rsync}"
done
## Note: These small folders have items that previously were not published,
## but there's no real cost to including them, and excluding them seems
## likely to cause confusion as the codebase evolves:
## packages/Files packages/PHP packages/Text
[ ! -d "$to" ] && mkdir "$to"
$DM_RSYNC -avC $excludes_rsync --include=core "$repo/./" "$to/./"
}
## usage: dm_install_wordpress <wp_repo_path> <to_path>
function dm_install_wordpress() {
local repo="$1"
......@@ -153,6 +173,15 @@ function dm_install_wordpress() {
## Need --exclude=civicrm for self-building on WP site
}
## Generate the composer "vendor" folder
## usage: dm_generate_vendor <repo_path>
function dm_generate_vendor() {
local repo="$1"
pushd "$repo"
composer install
popd
}
## Generate civicrm-version.php
## usage: dm_generate_version <file> <ufname>
function dm_generate_version() {
......
......@@ -20,6 +20,7 @@ cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
dm_generate_version "$TRG/civicrm-version.php" Drupal6
dm_install_core "$SRC" "$TRG"
dm_install_packages "$SRC/packages" "$TRG/packages"
dm_install_vendor "$SRC/vendor" "$TRG/vendor"
dm_install_drupal "$SRC/drupal" "$TRG/drupal"
# gen tarball
......
......@@ -20,6 +20,7 @@ cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
dm_generate_version "$TRG/civicrm-version.php" Drupal
dm_install_core "$SRC" "$TRG"
dm_install_packages "$SRC/packages" "$TRG/packages"
dm_install_vendor "$SRC/vendor" "$TRG/vendor"
dm_install_drupal "$SRC/drupal" "$TRG/drupal"
# gen tarball
......
......@@ -20,6 +20,7 @@ cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
dm_generate_version "$TRG/civicrm-version.php" Drupal
dm_install_core "$SRC" "$TRG"
dm_install_packages "$SRC/packages" "$TRG/packages"
dm_install_vendor "$SRC/vendor" "$TRG/vendor"
dm_install_drupal "$SRC/drupal" "$TRG/drupal"
# delete packages that distributions on Drupal.org repalce if present
......
......@@ -20,6 +20,7 @@ cp $SRC/civicrm.config.php $TRG
dm_generate_version "$TRG/civicrm-version.php" Joomla
dm_install_core "$SRC" "$TRG"
dm_install_packages "$SRC/packages" "$TRG/packages"
dm_install_vendor "$SRC/vendor" "$TRG/vendor"
## WTF: It's so good we'll install it twice!
## (The first is probably extraneous, but there could be bugs dependent on it.)
......
......@@ -20,6 +20,7 @@ cp $SRC/WordPress/civicrm.config.php.wordpress $TRG/civicrm/civicrm/civicrm.conf
dm_generate_version "$TRG/civicrm/civicrm/civicrm-version.php" Wordpress
dm_install_core "$SRC" "$TRG/civicrm/civicrm"
dm_install_packages "$SRC/packages" "$TRG/civicrm/civicrm/packages"
dm_install_vendor "$SRC/vendor" "$TRG/civicrm/civicrm/vendor"
dm_install_wordpress "$SRC/WordPress" "$TRG/civicrm"
# gen tarball
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment