name not label
[civicrm-core.git] / distmaker / distmaker.sh
index 933be8d2de826e1f41563ccdacaff62dac884ebf..e648d9e14747b6f84cc73e43bdd8df3411d38797 100755 (executable)
@@ -41,6 +41,7 @@ D56PACK=0
 D7DIR=0
 J5PACK=0
 WP5PACK=0
+PATCHPACK=0
 SK5PACK=0
 L10NPACK=0
 REPOREPORT=0
@@ -61,6 +62,7 @@ display_usage()
   echo "  d7_dir         - generate Drupal7 PHP5 module, but output to a directory, no tarball"
   echo "  Joomla|j5      - generate Joomla PHP5 module"
   echo "  WordPress|wp5  - generate Wordpress PHP5 module"
+  echo "  patchset       - generate a tarball with patch files"
   echo "  sk             - generate Drupal StarterKit module"
   echo
   echo "You also need to have distmaker.conf file in place."
@@ -193,6 +195,12 @@ case $1 in
   WP5PACK=1
   ;;
 
+  ## PATCHSET export
+  patchset)
+  echo; echo "Generating patchset"; echo;
+  PATCHPACK=1
+  ;;
+
   # REPO REPORT PHP5
   report)
   echo; echo "Generating repo report module"; echo;
@@ -207,6 +215,7 @@ case $1 in
   D56PACK=1
   J5PACK=1
   WP5PACK=1
+  PATCHPACK=1
   SKPACK=1
   L10NPACK=1
   REPOREPORT=1
@@ -238,13 +247,10 @@ if [ -d "$DM_SOURCEDIR/drupal-8" ]; then
   dm_git_checkout "$DM_SOURCEDIR/drupal-8" "$DM_REF_DRUPAL8"
 fi
 
-## Get latest dependencies
+## Get fresh dependencies
+[ -d "$DM_SOURCEDIR/vendor" ] && rm -rf $DM_SOURCEDIR/vendor
+[ -d "$DM_SOURCEDIR/bower_components" ] && rm -rf $DM_SOURCEDIR/bower_components
 dm_generate_vendor "$DM_SOURCEDIR"
-## if we already have a bower_compoents dir empty it.
-if [ -d "$DM_SOURCEDIR/bower_components" ]; then
-  rm -rf $DM_SOURCEDIR/bower_components/* 
-fi
-dm_generate_bower "$DM_SOURCEDIR"
 
 # Before anything - regenerate DAOs
 
@@ -300,6 +306,11 @@ if [ "$WP5PACK" = 1 ]; then
   bash $P/dists/wordpress_php5.sh
 fi
 
+if [ "$PATCHPACK" = 1 ]; then
+  echo; echo "Packaging for patchset tarball"; echo;
+  bash $P/dists/patchset.sh
+fi
+
 if [ "$REPOREPORT" = 1 ]; then
   echo; echo "Preparing repository report"; echo;
   env \