CRM-17711 - distmaker for Backdrop
authorTim Otten <totten@civicrm.org>
Wed, 16 Dec 2015 02:01:59 +0000 (18:01 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 17 Dec 2015 04:32:06 +0000 (20:32 -0800)
Also: Allow calling `distmaker` with less confusing arguments (`d56` vs
`Drupal6`; `j5` vs `Joomla).

distmaker/distmaker.conf.dist
distmaker/distmaker.sh
distmaker/dists/backdrop_php5.sh [new file with mode: 0644]

index f631f20bfdf999f0df86150ec8cf6ea9a39a8abc..2d6fd480514bafb89f8f8bbdc41988a047f7ae3e 100644 (file)
@@ -16,6 +16,7 @@ DM_VERSION= <Set this to whatever the version number should be>
 
 ## 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}
index 179c54aacd731e30ddccff9ce6c87b842fd383dc..72b29531f78f50e7166ef40bed2d4c4216a9aae8 100755 (executable)
@@ -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 (file)
index 0000000..768d0e1
--- /dev/null
@@ -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