Skip to content

Commit

Permalink
adding the deploy file and updating the screenshots and readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
enejb committed Apr 3, 2012
1 parent 4d14a5b commit 0100a01
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 6 deletions.
78 changes: 78 additions & 0 deletions deploy.sh
@@ -0,0 +1,78 @@
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# http://thereforei.am/2011/04/21/git-to-svn-automated-wordpress-plugin-deployment/

# main config
PLUGINSLUG="wiki-embed"
CURRENTDIR=`pwd`
MAINFILE="wiki-embed.php" # this should be the name of your main php file in the wordpress plugin

# git config
GITPATH="$CURRENTDIR/" # this file should be in the base of your git repository

# svn config
SVNPATH="/tmp/$PLUGINSLUG" # path to a temp SVN repo. No trailing slash required and don't add trunk.
SVNURL="http://plugins.svn.wordpress.org/wiki-embed" # Remote SVN repo on wordpress.org, with no trailing slash
SVNUSER="enej" # your svn username


# Let's begin...
echo ".........................................."
echo
echo "Preparing to deploy wordpress plugin"
echo
echo ".........................................."
echo

# Check version in readme.txt is the same as plugin file
NEWVERSION1=`grep "^Stable tag" $GITPATH/readme.txt | awk -F' ' '{print $3}'`
echo "readme version: $NEWVERSION1"
NEWVERSION2=`grep "^Version" $GITPATH/$MAINFILE | awk -F' ' '{print $2}'`
echo "$MAINFILE version: $NEWVERSION2"

if [ "$NEWVERSION1" != "$NEWVERSION2" ]; then echo "Versions don't match. Exiting...."; exit 1; fi

echo "Versions match in readme.txt and PHP file. Let's proceed..."

cd $GITPATH
echo -e "Enter a commit message for this new version: \c"
read COMMITMSG
git commit -am "$COMMITMSG"

echo "Tagging new version in git"
git tag -a "$NEWVERSION1" -m "Tagging version $NEWVERSION1"

echo "Pushing latest commit to origin, with tags"
git push origin master
git push origin master --tags

echo
echo "Creating local copy of SVN repo ..."
svn co $SVNURL $SVNPATH

echo "Exporting the HEAD of master from git to the trunk of SVN"
git checkout-index -a -f --prefix=$SVNPATH/trunk/

echo "Ignoring github specific files and deployment script"
svn propset svn:ignore "deploy.sh
README.md
.git
.gitignore" "$SVNPATH/trunk/"

echo "Changing directory to SVN and committing to trunk"
cd $SVNPATH/trunk/
# Add all new files that are not set to be ignored
svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add
svn commit --username=$SVNUSER -m "$COMMITMSG"

echo "Creating new SVN tag & committing it"
cd $SVNPATH/
svn cp trunk tags/$NEWVERSION1
cd $SVNPATH/tags/$NEWVERSION1
svn commit --username=$SVNUSER -m "Tagging version $NEWVERSION1"

echo "Removing temporary directory $SVNPATH"
rm -fr $SVNPATH/

echo "*** FIN ***"
18 changes: 12 additions & 6 deletions readme.txt
@@ -1,17 +1,21 @@
=== Wiki Embed ===
Contributors: enej, ejackisch, ctltdev, oltdev
Contributors: enej, ejackisch, ctlt-dev, ubcdev
Tags: mediawiki, wiki, wiki-embed, embed, content framework, wiki inc,
Requires at least: 3.0


Requires at least: 3.3

Wiki Embed lets you embed mediawiki pages in to your site, sites like Wikipedia

== Description ==

The Wiki Embed's intent is to help create a (http://wiki.ubc.ca/Resource_Management_Framework "Resourse Management Framework").

It tries its damn hardest to pull in the content from a mediawiki page into the wordpress environment. After html scraping the content from the mediawiki page using a special url. ( note: try adding '?action=render' to the end of to any mediawiki url) it strips out unwanted content and adds some tabs if you so desire.
It tries its damn hardest to pull in the content from a MediaWiki page into the WordPress environment. After html scraping the content from the MediaWiki page using a special url. ( note: try adding '?action=render' to the end of to any MediaWiki url) it strips out unwanted content and adds some tabs if you so desire.


To contribute to this plugin
start here:
https://github.com/ubc/wiki-embed


== Frequently Asked Questions ==

Expand All @@ -35,10 +39,12 @@ Maybe, but why would you want to? That is not what the tool was designed to do.
== Changelog ==
= 1.4 =
* Enables ability to split article into accordion (via jQuery UI)
* Rewrote function that parses/renders html to no longer use Simple HTML DOM parser as it uses a lot of resources
* Rewrote function that parses/renders html to no longer use Simple HTML DOM parser as it uses a lot of resources
* Updated caching: Now if the remote page can't be accessed, cached content will be served if it exists, even if it is past its expiry date.
* More caching: Now if the cache expires the page will show the cached content one last time and refresh it immediately after. This means the user should never really face delays for the wiki content is to be retrieved and parsed.
* Fixed overlay view
* The refresh of the page happens after the page has been set to the browser.
* Skipping version 1.3 since there are a lot of change in version 1.4

= 1.2.4 =
* Bug fix: Causes errors on 404 pages. Links stop working. Now fixed
Expand Down
Binary file modified screenshot-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshot-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0100a01

Please sign in to comment.