mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 15:02:54 +00:00
remove no longer needed Fedora specific stuff - git hook setup & mail config
This commit is contained in:
parent
6a7d1d10af
commit
ee19bebbb6
3 changed files with 5 additions and 41 deletions
|
@ -1,12 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Create a new development branch for a module.
|
# Create a new development branch for a package.
|
||||||
# THIS HAS TO BE RUN ON THE GIT SERVER!
|
|
||||||
|
|
||||||
# WARNING:
|
|
||||||
# This file is maintained within puppet?
|
|
||||||
# All local changes will be lost.
|
|
||||||
|
|
||||||
|
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
@ -22,9 +16,6 @@ if [ ! -d $REPODIR ] ; then
|
||||||
exit -9
|
exit -9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# where are the packages kept
|
|
||||||
TOPLEVEL=rpms
|
|
||||||
|
|
||||||
# Local variables
|
# Local variables
|
||||||
VERBOSE=0
|
VERBOSE=0
|
||||||
TEST=
|
TEST=
|
||||||
|
@ -92,7 +83,7 @@ if [ -z "$BRANCH" -o -z "$PACKAGES" ] ; then
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# prefix default namespace if set
|
# prepend default namespace if set
|
||||||
NEWP=
|
NEWP=
|
||||||
for PACKAGE in $PACKAGES ; do
|
for PACKAGE in $PACKAGES ; do
|
||||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Create a new development branch for a module.
|
# Create a new development branch for a package.
|
||||||
# THIS HAS TO BE RUN ON THE GIT SERVER!
|
|
||||||
|
|
||||||
# WARNING:
|
|
||||||
# This file is maintained within puppet?
|
|
||||||
# All local changes will be lost.
|
|
||||||
|
|
||||||
|
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
@ -22,9 +16,6 @@ if [ ! -d $REPODIR ] ; then
|
||||||
exit -9
|
exit -9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# where are the packages kept
|
|
||||||
TOPLEVEL=rpms
|
|
||||||
|
|
||||||
# Local variables
|
# Local variables
|
||||||
VERBOSE=0
|
VERBOSE=0
|
||||||
TEST=
|
TEST=
|
||||||
|
@ -69,7 +60,6 @@ while [ -n "$1" ] ; do
|
||||||
TEST="yes"
|
TEST="yes"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
-b | --branch )
|
-b | --branch )
|
||||||
shift
|
shift
|
||||||
BRANCH=$1/master
|
BRANCH=$1/master
|
||||||
|
@ -92,7 +82,7 @@ if [ -z "$BRANCH" -o -z "$PACKAGES" ] ; then
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# prefix default namespace if set
|
# prepend default namespace if set
|
||||||
NEWP=
|
NEWP=
|
||||||
for PACKAGE in $PACKAGES ; do
|
for PACKAGE in $PACKAGES ; do
|
||||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Create a new repo.
|
# Create a new repo.
|
||||||
# THIS HAS TO BE RUN ON THE GIT SERVER!
|
|
||||||
|
|
||||||
# WARNING:
|
|
||||||
# This file is maintained within ansible
|
|
||||||
# All local changes will be lost.
|
|
||||||
|
|
||||||
|
|
||||||
# Figure out the environment we're running in
|
# Figure out the environment we're running in
|
||||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)"
|
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)"
|
||||||
|
@ -14,9 +8,7 @@ REPODIR=$gitroot_dir
|
||||||
: ${git_author_name="Undefined"}
|
: ${git_author_name="Undefined"}
|
||||||
: ${git_author_email="undefined@example.com"}
|
: ${git_author_email="undefined@example.com"}
|
||||||
|
|
||||||
# check if a moron is driving me
|
|
||||||
if [ ! -d $REPODIR ] ; then
|
if [ ! -d $REPODIR ] ; then
|
||||||
# we're not on the git server (this check is fragile)
|
|
||||||
echo "ERROR: This script has to be run on the git server."
|
echo "ERROR: This script has to be run on the git server."
|
||||||
echo "ERROR: Homer sez 'Duh'."
|
echo "ERROR: Homer sez 'Duh'."
|
||||||
exit -9
|
exit -9
|
||||||
|
@ -58,6 +50,7 @@ if [ -z "$PACKAGE" ] ; then
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# optionally prepend default namespace if $PACKAGE is not namespaced
|
||||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||||
parts=($(echo $PACKAGE | tr "/" " "))
|
parts=($(echo $PACKAGE | tr "/" " "))
|
||||||
parts_len=${#parts[@]}
|
parts_len=${#parts[@]}
|
||||||
|
@ -87,9 +80,6 @@ TMPDIR=$(mktemp -d /tmp/tmpXXXXXX)
|
||||||
mkdir -p $REPODIR/$PACKAGE.git
|
mkdir -p $REPODIR/$PACKAGE.git
|
||||||
pushd $REPODIR/$PACKAGE.git >/dev/null
|
pushd $REPODIR/$PACKAGE.git >/dev/null
|
||||||
git init -q --shared --bare
|
git init -q --shared --bare
|
||||||
echo "$PACKAGE" > description # This is used to figure out who to send mail to.
|
|
||||||
git config --add hooks.mailinglist "$(echo $PACKAGE | tr '/' '-')-owner@fedoraproject.org,scm-commits@lists.fedoraproject.org"
|
|
||||||
git config --add hooks.maildomain fedoraproject.org
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
mkdir -p $REPODIR/$PACKAGE.git/hooks/post-receive-chained.d
|
mkdir -p $REPODIR/$PACKAGE.git/hooks/post-receive-chained.d
|
||||||
|
@ -101,7 +91,6 @@ if [[ $grok && $grok != "False" ]]; then
|
||||||
ln -s /usr/share/dist-git/hooks/grok_update \
|
ln -s /usr/share/dist-git/hooks/grok_update \
|
||||||
$REPODIR/$PACKAGE.git/hooks/post-receive-chained.d/grok_update
|
$REPODIR/$PACKAGE.git/hooks/post-receive-chained.d/grok_update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This one kicks off all the others in post-receive-chained.d
|
# This one kicks off all the others in post-receive-chained.d
|
||||||
ln -s /usr/share/dist-git/hooks/post-receive \
|
ln -s /usr/share/dist-git/hooks/post-receive \
|
||||||
$REPODIR/$PACKAGE.git/hooks/post-receive
|
$REPODIR/$PACKAGE.git/hooks/post-receive
|
||||||
|
@ -123,11 +112,5 @@ if [[ $gitolite && $gitolite != "False" ]]; then
|
||||||
ln -s /etc/gitolite/hooks/common/update $REPODIR/$PACKAGE.git/hooks/update
|
ln -s /etc/gitolite/hooks/common/update $REPODIR/$PACKAGE.git/hooks/update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup our post-receive hooks
|
|
||||||
ln -s /usr/share/git-core/post-receive-fedmsg \
|
|
||||||
$REPODIR/$PACKAGE.git/hooks/post-receive-chained.d/post-receive-fedmsg
|
|
||||||
ln -s /usr/share/git-core/post-receive-alternativearch \
|
|
||||||
$REPODIR/$PACKAGE.git/hooks/post-receive-chained.d/post-receive-alternativearch
|
|
||||||
rm -rf $TMPDIR
|
rm -rf $TMPDIR
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
Loading…
Add table
Reference in a new issue