File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ Felipe Coury <felipe.coury@gmail.com>
88Jeff Lindsay <progrium@gmail.com>
99Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
1010Leo Unbekandt <leo@unbekandt.eu>
11+ Ludovic Perrine <jazzzz@gmail.com>
1112Luigi Maselli <grigio.org@gmail.com>
1213Martin Weiss <kornnflake@gmail.com>
1314Paul Lietar <paul@lietar.net>
Original file line number Diff line number Diff line change 22
33## 0.3.0 (in progress)
44
5+ * Added git submodules support
6+
57## 0.2.0 (2013-11-24)
68
79* Added DOKKU_TRACE variable for verbose trace information
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
33
4+ git_archive_all () {
5+ APP=$1 ; REV=$2
6+ TMP_WORK_DIR=$( mktemp -d)
7+ chmod 755 $TMP_WORK_DIR
8+ unset GIT_DIR GIT_WORK_TREE
9+ git clone $DOKKU_ROOT /$APP $TMP_WORK_DIR > /dev/null
10+ pushd $TMP_WORK_DIR > /dev/null
11+ git checkout $REV > /dev/null
12+ git submodule update --init --recursive > /dev/null
13+ find -name .git -prune -exec rm -rf {} \; > /dev/null
14+ tar c .
15+ popd > /dev/null
16+ rm -rf $TMP_WORK_DIR > /dev/null
17+ }
18+
419case " $1 " in
520 git-hook)
621 APP=$2
@@ -10,7 +25,7 @@ case "$1" in
1025 # Only run this script for the master branch. You can remove this
1126 # if block if you wish to run it for others as well.
1227 if [[ $refname = " refs/heads/master" ]] ; then
13- git archive $newrev | dokku receive $APP | sed -u " s/^/" $' \e [1G' " /"
28+ git_archive_all $APP $newrev | dokku receive $APP | sed -u " s/^/" $' \e [1G' " /"
1429 else
1530 echo $' \e [1G\e [K' " -----> WARNING: deploy did not complete, you must push to master."
1631 echo $' \e [1G\e [K' " -----> for example, try 'git push <dokku> ${refname/ refs\/ heads\/ } :master'"
You can’t perform that action at this time.
0 commit comments