Skip to content

Commit

Permalink
Set Maintainer: from local-config.sh
Browse files Browse the repository at this point in the history
Addresses #9, 'Pass git name/email into Docker for setting Maintainer:
in packages'
  • Loading branch information
zultron committed Apr 13, 2015
1 parent 17a972c commit d2a470b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
23 changes: 12 additions & 11 deletions local-config-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
#
# Copy this file to `local-config.sh` and customize for your site
#
# The below examples are intended for many use cases; see
# `scripts/base-config.sh`, `scripts/packages/*.sh` and
# `scripts/distro/*.sh` for more variables to customize
# The below examples are intended for many use cases; see files in
# `base-config.sh`, `packages`, `distro` and `repo` in the `scripts`
# directory for more variables to customize.

# http/https proxy for package downloads
#HTTP_PROXY=http://192.168.0.42:3128

# Whether to always allocate a tty in Docker (true/false)
# Set your user name and email here. Used as the 'Maintainer' field in
# package changelogs.
#
# A bug in Docker pre-1.1.1 prevents command exit status from the
# `docker run` command when a tty is allocated. Set to `false` if you
# need exit status from Docker.
#DOCKER_ALWAYS_ALLOCATE_TTY=true
#MAINTAINER="John Doe"
#EMAIL="[email protected]"

# Override distro settings
#
Expand All @@ -26,3 +22,8 @@
#
# Add repo to distro
#DISTRO_REPOS[jessie]+=" dovetail-automata"

# Use http/https proxy for package downloads. Especially useful for
# caching packages between removing and rebuilding schroots.
#
#HTTP_PROXY=http://192.168.0.42:3128
6 changes: 4 additions & 2 deletions scripts/debian-debzn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ debianization_init() {
CHANGELOG=/tmp/changelog-$PACKAGE-$DISTRO

if test -z "$MAINTAINER"; then
MAINTAINER="$(git config user.name)" || MAINTAINER="dxsbuild user"
MAINTAINER="$(git --git-dir=$DEBZN_GIT_DIR/.git config user.name)" || \
error "Please set 'MAINTAINER' in local-config.sh"
fi
if test -z "$EMAIL"; then
EMAIL="$(git config user.email)" || EMAIL="[email protected]"
EMAIL="$(git --git-dir=$DEBZN_GIT_DIR/.git config user.email)" || \
error "Please set 'EMAIL' in local-config.sh"
fi
debug " Maintainer <email>: $MAINTAINER <$EMAIL>"
}
Expand Down

0 comments on commit d2a470b

Please sign in to comment.