Changeset 1422


Ignore:
Timestamp:
03/17/18 08:54:56 (5 weeks ago)
Author:
gogo
Message:

A couple minor changes preparing for release.

Location:
trunk/contrib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/contrib/generate-plugin-manifest.sh

    r1421 r1422  
    4646     
    4747    SPACES="$(repl $(expr $NAME_LENGTH - $(echo $file | wc -c)))" 
    48     echo "$file:$SPACES{ url: _editor_url+'$dir/$file/$TARGET' },"     
     48    echo "  $file:$SPACES{ url: _editor_url+'$dir/$file/$TARGET' }," 
    4949  done 
    5050  cd ../ 
  • trunk/contrib/make-release.sh

    r1402 r1422  
     1#!/bin/bash 
     2 
     3if ! [ -f XinhaCore.js ] 
     4then 
     5  echo "Run this from the root of your working copy." >&2 
     6  echo                                                >&2 
     7  exit 1 
     8fi 
     9 
     10 
     11if ! [ -d .svn ] 
     12then  
     13  echo "This script must be run inside a subversion working copy." >&2 
     14  echo                                                             >&2 
     15  exit 1 
     16fi 
     17 
     18if [ "$1" = "" ] 
     19then 
     20  echo "Usage: $0 {VersionNumber}"                    >&2 
     21  echo                                                >&2 
     22  exit 1 
     23fi 
     24 
    125# Run this with bash from the root of your SVN working copy checkout of the trunk 
    226# it will dump int /tmp the archived release files 
    327# eg bash contrib/make-release.sh 
    428 
    5 VER=0.96.1 
     29VER="$1" 
    630 
    7 if ! [ -f XinhaCore.js ] 
    8 then  
    9   echo "Run this script from inside your Xinha Root directory." 
    10   exit 1 
    11 fi 
     31# Update plugin Manifest 
     32MANIFEST="$(bash contrib/generate-plugin-manifest.sh | sort | perl -0777 -pe 's/,\s*$//s' )" 
     33cat XinhaCore.js | perl -0777  -pe 's/(.pluginManifest\s+=)\s+.+?;/\1 {\nPUT_THE_MANIFEST_HERE_YO\n};/is' | replace PUT_THE_MANIFEST_HERE_YO "$MANIFEST" >XinhaCore2.js 
     34mv XinhaCore2.js XinhaCore.js 
    1235 
    13 if ! [ -f .svn ] 
    14 then  
    15   echo "This script must be run inside a subversion working copy." 
    16   exit 1 
    17 fi 
     36# Export 
     37mkdir /tmp/Xinha-$VER 
     38svn export $(pwd) /tmp/Xinha-$VER/xinha 
     39cd /tmp/Xinha-$VER/xinha 
     40echo "xinha-$VER" >VERSION.TXT 
    1841 
    19 # Create merged language files for translators 
     42# Create the merged language files 
    2043php contrib/lc_parse_strings.php 
    2144for lang in $(find . -wholename "*/lang/*.js" | sed -r 's/.*\///' | sort | uniq | grep -v base | sed -r 's/.js//') 
     
    2649 
    2750 
    28 # 
    29 svn export $(pwd) /tmp/Xinha-$VER 
    30 cd /tmp 
    31 zip -r Xinha-$VER.zip /tmp/Xinha-$VER 
    32 tar -cjvf Xinha-$VER.tar.bz2 /tmp/Xinha-$VER 
    33 cd Xinha-$VER 
     51cd ../ 
     52 
     53# Create the main distribution zip and bz2 
     54zip -r xinha-$VER.zip        xinha 
     55tar -cjvf xinha-$VER.tar.bz2 xinha 
     56 
     57# Make a strippped down plugins set for the plugins which must be run locally 
     58#  ie, ones that upload files or deal with the local server file system 
     59mkdir local_plugins 
     60mkdir local_plugins/contrib 
     61mkdir local_plugins/plugins 
     62cp -rp xinha/contrib/php-xinha.php         local_plugins/contrib 
     63cp -rp xinha/contrib/.htaccess             local_plugins/contrib 
     64cp -rp xinha/plugins/MootoolsFileManager   local_plugins/plugins 
     65cp -rp xinha/plugins/Linker                local_plugins/plugins 
     66cat >local_plugins/README.TXT <<'EOF' 
     67Xinha Local Plugins  
     68-------------------------------------------------------------------------------- 
     69 
     70This directory contains plugins for Xinha (www.xinha.org) which must be run on 
     71the local web server rather than from an external server/content delivery 
     72network. 
     73 
     74Consult the NewbieGuide ( http://trac.xinha.org/wiki/NewbieGuide )  
     75for more complete details on Xinha configuration, however in short you can load 
     76Xinha using local plugins like this (assuming you upload the local_plugins 
     77directory to the root of your website). 
     78 
     79  <script type="text/javascript" src="//s3-us-west-1.amazonaws.com/xinha/xinha-1.5-beta1/XinhaEasy.js"> 
     80    xinha_options = { 
     81      xinha_plugins: [ 
     82        'minimal',  
     83        // Note that from is a URL to the plugins directory inside the 
     84        //  local_plugins directory, adjust for where you upload. 
     85        {from: '/local_plugins/plugins', load: ['MootoolsFileManager'] }] 
     86      ], 
     87 
     88      xinha_config:            function(xinha_config)  
     89      { 
     90         
     91        // Configure the File Manager 
     92        with (xinha_config.MootoolsFileManager) 
     93        {  
     94          <?php  
     95            require_once($_SERVER['DOCUMENT_ROOT'].'/local_plugins/contrib/php-xinha.php'); 
     96            xinha_pass_to_php_backend 
     97            (        
     98              array 
     99              ( 
     100                'images_dir' => $_SERVER['DOCUMENT_ROOT'] . '/images', 
     101                'images_url' => '/images', 
     102                'images_allow_upload' => true, 
     103                'images_allow_delete' => true, 
     104                'images_allow_download' => true, 
     105                'images_use_hspace_vspace' => false, 
     106                 
     107                'files_dir' => $_SERVER['DOCUMENT_ROOT'] . '/files', 
     108                'files_url' => '/files', 
     109                'files_allow_upload' => true, 
     110                'max_files_upload_size' => '4M', 
     111              ) 
     112            ) 
     113          ?> 
     114        } 
     115      } 
     116    } 
     117  </script> 
     118EOF 
     119echo "xinha-$VER" >local_plugins/VERSION.TXT 
     120zip -r    local_plugins.zip     local_plugins 
     121tar -cjvf local_plugins.tar.bz2 local_plugins 
     122 
     123cd xinha 
    34124php contrib/compress_yui.php 
    35125sleep 5 
    36126cd ../ 
    37 zip -r Xinha-$Ver-Compressed.zip /tmp/Xinha-$VER 
    38 tar -cjvf Xinha-$Ver-Compressed.tar.bz2 /tmp/Xinha-$VER 
    39  
     127zip -r    xinha-compressed-$VER.zip     xinha 
     128tar -cjvf xinha-compressed-$VER.tar.bz2 xinha 
  • trunk/contrib/php-xinha.php

    r1327 r1422  
    1010   *  As a result, this method (in combination with the above) uses a simple file-storage 
    1111   *  mechanism to record the necessary secret data instead of the php sessions. 
     12   * 
     13   *  Since this method doesn't pass much data in the url/post data, it can also be used 
     14   *  if you run into mod_security type restrictions. 
    1215   * 
    1316   *  Caution, if you are load balancing, then all the servers in that cluster will need  
     
    229232    return $maxcount ? $empty : false; 
    230233  } 
     234   
    231235  /** Write the appropriate xinha_config directives to pass data to a PHP (Plugin) backend file. 
    232236   * 
Note: See TracChangeset for help on using the changeset viewer.