Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions assets.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

SLUG=$(basename $(dirname $PWD))
BASEDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
SLUG=$(basename $BASEDIR)

# These are needed because this itself is a Git repo
export GIT_WORK_TREE=$(dirname $PWD)/git
export GIT_DIR=$(dirname $PWD)/git/.git
export GIT_WORK_TREE=${BASEDIR}/git
export GIT_DIR=${BASEDIR}/git/.git

assets_exist=`git show-ref refs/heads/assets`

Expand Down
17 changes: 9 additions & 8 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
MSG=${1-'Deploy from git'}
BRANCH=${2-'trunk'}

SLUG=$(basename $(dirname $PWD))
SRC_DIR=$(dirname $PWD)/git
DEST_DIR=$(dirname $PWD)/svn/$BRANCH
BASEDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
SLUG=$(basename $BASEDIR)
SRC_DIR=${BASEDIR}/git
DEST_DIR=${BASEDIR}/svn/$BRANCH

# These are needed because this itself is a Git repo
export GIT_WORK_TREE=$(dirname $PWD)/git
export GIT_DIR=$(dirname $PWD)/git/.git
export GIT_WORK_TREE=${BASEDIR}/git
export GIT_DIR=${BASEDIR}/git/.git

# make sure we're deploying from the right dir
if [ ! -d "$SRC_DIR/.git" ]; then
Expand All @@ -19,9 +20,9 @@ if [ ! -d "$SRC_DIR/.git" ]; then
fi

# make sure the SVN repo exists
if [ ! -d "$(dirname $PWD)/svn" ]; then
echo "Coudn't find the SVN repo at $(dirname $PWD)/svn. Trying to create one..."
svn co http://plugins.svn.wordpress.org/$SLUG/ $(dirname $PWD)/svn
if [ ! -d "${BASEDIR}/svn" ]; then
echo "Coudn't find the SVN repo at ${BASEDIR}/svn. Trying to create one..."
svn co http://plugins.svn.wordpress.org/$SLUG/ ${BASEDIR}/svn
exit
fi

Expand Down
10 changes: 6 additions & 4 deletions pot.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

TYPE=${1-'wp-plugin'}
SLUG=$(basename $(dirname $PWD))

BASEDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
SLUG=$(basename $BASEDIR)

# These are needed because this itself is a Git repo
export GIT_WORK_TREE=$(dirname $PWD)/git
export GIT_DIR=$(dirname $PWD)/git/.git
export GIT_WORK_TREE=${BASEDIR}/git
export GIT_DIR=${BASEDIR}/git/.git

git checkout -f master

php $PWD/wp-develop/tools/i18n/makepot.php $TYPE $GIT_WORK_TREE $GIT_WORK_TREE/languages/$SLUG.pot
php $BASEDIR/wp-deploy/wp-develop/tools/i18n/makepot.php $TYPE $GIT_WORK_TREE $GIT_WORK_TREE/languages/$SLUG.pot
7 changes: 4 additions & 3 deletions tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ fi
# args
TAG_NAME=$1

SLUG=$(basename $(dirname $PWD))
BASEDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
SLUG=$(basename $BASEDIR)

# These are needed because this itself is a Git repo
export GIT_WORK_TREE=$(dirname $PWD)/git
export GIT_DIR=$(dirname $PWD)/git/.git
export GIT_WORK_TREE=${BASEDIR}/git
export GIT_DIR=${BASEDIR}/git/.git

git checkout -f master
git tag $TAG_NAME
Expand Down