Merge pull request #1664 from progrium/mh-add-rev-to-pre-receive-app

add $REV to pre-receive-app call
This commit is contained in:
Jose Diaz-Gonzalez
2015-11-05 21:59:25 -05:00
2 changed files with 4 additions and 4 deletions

View File

@@ -610,7 +610,7 @@ nginx -t
- Description: Allows you to customize the contents of an application directory before they are processed for deployment. The `IMAGE_SOURCE_TYPE` can be any of `[herokuish, dockerfile]` - Description: Allows you to customize the contents of an application directory before they are processed for deployment. The `IMAGE_SOURCE_TYPE` can be any of `[herokuish, dockerfile]`
- Invoked by: `dokku git-hook`, `dokku tar-build-locked` - Invoked by: `dokku git-hook`, `dokku tar-build-locked`
- Arguments: `$APP $IMAGE_SOURCE_TYPE $TMP_WORK_DIR` - Arguments: `$APP $IMAGE_SOURCE_TYPE $TMP_WORK_DIR $REV`
- Example: - Example:
```shell ```shell
@@ -620,7 +620,7 @@ nginx -t
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; IMAGE_SOURCE_TYPE="$2"; TMP_WORK_DIR="$3" APP="$1"; IMAGE_SOURCE_TYPE="$2"; TMP_WORK_DIR="$3"; REV="$4"
echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome" echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
``` ```

View File

@@ -21,10 +21,10 @@ git_build_app_repo() {
find -name .git -prune -exec rm -rf {} \; > /dev/null find -name .git -prune -exec rm -rf {} \; > /dev/null
if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then
plugn trigger pre-receive-app "$APP" "dockerfile" "$TMP_WORK_DIR" plugn trigger pre-receive-app "$APP" "dockerfile" "$TMP_WORK_DIR" "$REV"
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
else else
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR" plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR" "$REV"
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
fi fi
} }