mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 23:12:55 +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
|
||||
#
|
||||
# Create a new development branch for a module.
|
||||
# THIS HAS TO BE RUN ON THE GIT SERVER!
|
||||
|
||||
# WARNING:
|
||||
# This file is maintained within puppet?
|
||||
# All local changes will be lost.
|
||||
|
||||
# Create a new development branch for a package.
|
||||
|
||||
# Figure out the environment we're running in
|
||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||
|
@ -22,9 +16,6 @@ if [ ! -d $REPODIR ] ; then
|
|||
exit -9
|
||||
fi
|
||||
|
||||
# where are the packages kept
|
||||
TOPLEVEL=rpms
|
||||
|
||||
# Local variables
|
||||
VERBOSE=0
|
||||
TEST=
|
||||
|
@ -92,7 +83,7 @@ if [ -z "$BRANCH" -o -z "$PACKAGES" ] ; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
# prefix default namespace if set
|
||||
# prepend default namespace if set
|
||||
NEWP=
|
||||
for PACKAGE in $PACKAGES ; do
|
||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Create a new development branch for a module.
|
||||
# THIS HAS TO BE RUN ON THE GIT SERVER!
|
||||
|
||||
# WARNING:
|
||||
# This file is maintained within puppet?
|
||||
# All local changes will be lost.
|
||||
|
||||
# Create a new development branch for a package.
|
||||
|
||||
# Figure out the environment we're running in
|
||||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||
|
@ -22,9 +16,6 @@ if [ ! -d $REPODIR ] ; then
|
|||
exit -9
|
||||
fi
|
||||
|
||||
# where are the packages kept
|
||||
TOPLEVEL=rpms
|
||||
|
||||
# Local variables
|
||||
VERBOSE=0
|
||||
TEST=
|
||||
|
@ -69,7 +60,6 @@ while [ -n "$1" ] ; do
|
|||
TEST="yes"
|
||||
;;
|
||||
|
||||
|
||||
-b | --branch )
|
||||
shift
|
||||
BRANCH=$1/master
|
||||
|
@ -92,7 +82,7 @@ if [ -z "$BRANCH" -o -z "$PACKAGES" ] ; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
# prefix default namespace if set
|
||||
# prepend default namespace if set
|
||||
NEWP=
|
||||
for PACKAGE in $PACKAGES ; do
|
||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 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
|
||||
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_email="undefined@example.com"}
|
||||
|
||||
# check if a moron is driving me
|
||||
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: Homer sez 'Duh'."
|
||||
exit -9
|
||||
|
@ -58,6 +50,7 @@ if [ -z "$PACKAGE" ] ; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
# optionally prepend default namespace if $PACKAGE is not namespaced
|
||||
PACKAGE=`echo $PACKAGE | sed -e "s+^/*\([^/]*\)/*$+\1+"`
|
||||
parts=($(echo $PACKAGE | tr "/" " "))
|
||||
parts_len=${#parts[@]}
|
||||
|
@ -87,9 +80,6 @@ TMPDIR=$(mktemp -d /tmp/tmpXXXXXX)
|
|||
mkdir -p $REPODIR/$PACKAGE.git
|
||||
pushd $REPODIR/$PACKAGE.git >/dev/null
|
||||
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
|
||||
|
||||
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 \
|
||||
$REPODIR/$PACKAGE.git/hooks/post-receive-chained.d/grok_update
|
||||
fi
|
||||
|
||||
# This one kicks off all the others in post-receive-chained.d
|
||||
ln -s /usr/share/dist-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
|
||||
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
|
||||
|
||||
echo "Done."
|
||||
|
|
Loading…
Add table
Reference in a new issue