From f07f92fa12e774168168e8127775b14a98384f24 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 15 Dec 2015 18:01:59 -0800 Subject: [PATCH] CRM-17711 - distmaker for Backdrop Also: Allow calling `distmaker` with less confusing arguments (`d56` vs `Drupal6`; `j5` vs `Joomla). --- distmaker/distmaker.conf.dist | 1 + distmaker/distmaker.sh | 37 ++++++++++++++++++++++---------- distmaker/dists/backdrop_php5.sh | 32 +++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 distmaker/dists/backdrop_php5.sh diff --git a/distmaker/distmaker.conf.dist b/distmaker/distmaker.conf.dist index f631f20bfd..2d6fd48051 100644 --- a/distmaker/distmaker.conf.dist +++ b/distmaker/distmaker.conf.dist @@ -16,6 +16,7 @@ DM_VERSION= ## Git banch/tag name DM_REF_CORE=master +DM_REF_BACKDROP=1.x-${DM_REF_CORE} DM_REF_DRUPAL=7.x-${DM_REF_CORE} DM_REF_DRUPAL6=6.x-${DM_REF_CORE} DM_REF_JOOMLA=${DM_REF_CORE} diff --git a/distmaker/distmaker.sh b/distmaker/distmaker.sh index 179c54aacd..72b29531f7 100755 --- a/distmaker/distmaker.sh +++ b/distmaker/distmaker.sh @@ -31,6 +31,7 @@ ORIGPWD=`pwd` source "$P/dists/common.sh" # Set no actions by default +BPACK=0 D5PACK=0 D56PACK=0 J5PACK=0 @@ -46,13 +47,14 @@ display_usage() echo " distmaker.sh OPTION" echo echo "Options available:" - echo " all - generate all available tarballs" - echo " l10n - generate internationalization data" - echo " d5 - generate Drupal7 PHP5 module" - echo " d5.6 - generate Drupal6 PHP5 module" - echo " j5 - generate Joomla PHP5 module" - echo " wp5 - generate Wordpress PHP5 module" - echo " sk - generate Drupal StarterKit module" + echo " all - generate all available tarballs" + echo " l10n - generate internationalization data" + echo " Backdrop - generate Backdrop PHP5 module" + echo " Drupal|d5 - generate Drupal7 PHP5 module" + echo " Drupal6|d5.6 - generate Drupal6 PHP5 module" + echo " Joomla|j5 - generate Joomla PHP5 module" + echo " WordPress|wp5 - generate Wordpress PHP5 module" + echo " sk - generate Drupal StarterKit module" echo echo "You also need to have distmaker.conf file in place." echo "See distmaker.conf.dist for example contents." @@ -107,8 +109,14 @@ case $1 in L10NPACK=1 ;; + # BACKDROP PHP5 + Backdrop) + echo; echo "Generating Backdrop PHP5 module"; echo; + BPACK=1 + ;; + # DRUPAL7 PHP5 - d5) + d5|Drupal) echo; echo "Generating Drupal7 PHP5 module"; echo; D5PACK=1 ;; @@ -120,19 +128,19 @@ case $1 in ;; # DRUPAL6 PHP5 - d5.6) + d5.6|Drupal6) echo; echo "Generating Drupal6 PHP5 module"; echo; D56PACK=1 ;; # JOOMLA PHP5 - j5) + j5|Joomla) echo; echo "Generating Joomla PHP5 module"; echo; J5PACK=1 ;; # WORDPRESS PHP5 - wp5) + wp5|WordPress) echo; echo "Generating Wordpress PHP5 module"; echo; WP5PACK=1 ;; @@ -140,6 +148,7 @@ case $1 in # ALL all) echo; echo "Generating all we've got."; echo; + BPACK=1 D5PACK=1 D56PACK=1 J5PACK=1 @@ -179,6 +188,12 @@ if [ "$L10NPACK" = 1 ]; then bash $P/dists/l10n.sh fi +if [ "$BPACK" = 1 ]; then + echo; echo "Packaging for Backdrop, PHP5 version"; echo; + dm_git_checkout "$DM_SOURCEDIR/drupal" "$DM_REF_BACKDROP" + bash $P/dists/backdrop_php5.sh +fi + if [ "$D56PACK" = 1 ]; then echo; echo "Packaging for Drupal6, PHP5 version"; echo; dm_git_checkout "$DM_SOURCEDIR/drupal" "$DM_REF_DRUPAL6" diff --git a/distmaker/dists/backdrop_php5.sh b/distmaker/dists/backdrop_php5.sh new file mode 100644 index 0000000000..768d0e163b --- /dev/null +++ b/distmaker/dists/backdrop_php5.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -ex + +P=`dirname $0` +CFFILE=$P/../distmaker.conf +if [ ! -f $CFFILE ] ; then + echo "NO DISTMAKER.CONF FILE!" + exit 1 +else + . $CFFILE +fi +. "$P/common.sh" + +SRC=$DM_SOURCEDIR +TRG=$DM_TMPDIR/civicrm + +# copy all the stuff +dm_reset_dirs "$TRG" +cp $SRC/drupal/civicrm.config.php.backdrop $TRG/civicrm.config.php +dm_generate_version "$TRG/civicrm-version.php" Backdrop +dm_install_core "$SRC" "$TRG" +dm_install_packages "$SRC/packages" "$TRG/packages" +dm_install_vendor "$SRC/vendor" "$TRG/vendor" +dm_install_bower "$SRC/bower_components" "$TRG/bower_components" +dm_install_drupal "$SRC/backdrop" "$TRG/backdrop" + +# gen tarball +cd $TRG/.. +tar czf $DM_TARGETDIR/civicrm-$DM_VERSION-backdrop-unstable.tar.gz civicrm + +# clean up +rm -rf $TRG -- 2.25.1