Commit 2cf508a9 authored by gregor herrmann's avatar gregor herrmann

Remove dpt-alioth-repo

and point to its successor `dpt salsa pushrepo'.
parent d2fa7c42
......@@ -83,7 +83,8 @@ Show this documentation.
=item B<alioth-repo> - clone newly created repository to alioth.debian.org
See L<dpt-alioth-repo(1)>.
Removed. Please use `dpt salsa pushrepo' as a successor.
See L<dpt-salsa(1)>.
=item B<cd> - change directory to a package working directory
......
......@@ -148,11 +148,6 @@ Copyright: 2008, 2009, 2013, Damyan Ivanov <dmn@debian.org>
2008, 2009, Ryan Niebur <ryan@debian.org>
License: Artistic or GPL-1+
Files: scripts/alioth-repo
Copyright: 2011, Damyan Ivanov <dmn@debian.org>
2012, gregor herrmann <gregoa@debian.org>
License: Artistic or GPL-1+
Files: scripts/debian-upstream scripts/upstream-repo
Copyright: 2013-2014, gregor herrmann <gregoa@debian.org>
2014, David Bremner <bremner@debian.org>
......
#!/bin/sh
# documentation, copyright and license at the end
set -e -u
# fall back if Module::Inspector fails
detect_dist() {
DIR=.
local PERLNAME
PERLNAME=''
if [ -s $DIR/Build.PL ]; then
PERLNAME=$(perl -n -e "print if s;^.*module_name.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $DIR/Build.PL | sed -e 's/::/-/g' | head -n 1)
fi
if [ -s $DIR/Makefile.PL ]; then
PERLNAME=$(perl -n -e "print if s;^.*(?:DIST)?NAME.*=>.*['\"[]([a-zA-Z0-9:_-]+)[]'\"].*\$;\$1;" $DIR/Makefile.PL | sed -e 's/::/-/g' | head -n 1)
fi
if [ -s $DIR/META.yml ]; then
PERLNAME=$(perl -n -e "print if s;^name:.* ([a-zA-Z0-9:_-]+).*\$;\$1;" $DIR/META.yml | head -n 1)
fi
if [ -n "$PERLNAME" ]; then
if curl --location --silent https://metacpan.org/release/$PERLNAME | grep '<title>.*</title>' | grep --silent $PERLNAME; then
echo $PERLNAME
fi
fi
}
PKG=`dpkg-parsechangelog --show-field Source`
[ -n "$PKG" ]
# needs META.yml
set +e
DIST=`perl -MModule::Inspector -we'my $d=Module::Inspector->new(dist_dir => "."); print $d->dist_name;'`
set -e
[ -n "$DIST" ] || DIST=$(detect_dist)
set +u
if [ -z "$DIST" ] && [ -n "$1" ]; then
set -u
DIST="$1"
fi
set -u
if [ -z "$DIST" ]; then
echo "E: Couldn't determine distribution name. You can pass it manually as parameter." 1>&2
exit 1
fi
# Setup the repository on alioth if it doesn't exist yet.
if ssh git.debian.org test -e "/git/pkg-perl/packages/$PKG.git"; then
echo "I: /git/pkg-perl/packages/$PKG.git already exists on git.debian.org, skipping setup-repository" 1>&2
else
ssh git.debian.org /git/pkg-perl/setup-repository $PKG \"Debian packaging of $DIST CPAN distribution\"
fi
# Check if there is already a remote called "origin" before proceeding
if git remote | egrep -q '^origin$'; then
if git remote -v | egrep "^origin[[:space:]].*git\.debian.org.*/git/pkg-perl/packages/$PKG\.git\b.*\(push\)$"; then
echo 'I: A remote called "origin" already exists and looks like the right one.' 1>&2
echo 'I: Skipping the addition of a remote repository named "origin".' 1>&2
else
echo "E: A remote called \"origin\" already exists and doesn't look right. Aborting." 1>&2
echo 'E: You may want to rename it with "git remote rename origin origin-old".' 1>&2
exit 1;
fi
else
git remote add origin ssh://git.debian.org/git/pkg-perl/packages/$PKG.git
fi
git push --all origin --set-upstream
git push --tags origin
exit 0
doc=<<'EOF'
=head1 NAME
dpt-alioth-repo -- clone newly created repository to alioth.debian.org
=head1 SYNOPSIS
B<dpt alioth-repo> [I<distribution name>]
=head1 DESCRIPTION
B<dpt alioth-repo> is to be run in a newly created Git repository containing
an unpacked Debian source package. It creates and configures a Git repository at
the right location on L<alioth.debian.org> and then pushes all branches and
tags.
The script tries hard to find the name of the CPAN distribution; if it
fails, I<distribution name> can be passed as a parameter to B<dpt
alioth-repo>. (Note that the name is currently only used for the description
of the Git repository.)
=head1 COPYRIGHT & LICENSE
=over
=item Copyright (c) 2011 Damyan Ivanov E<lt>dmn@debian.orgE<gt>
=item Copyright (c) 2012, 2016 gregor herrmann E<lt>gregoa@debian.orgE<gt>
=back
This program is free software; you can redistribute it and/or modify
it under the terms of either:
=over
=item (a)
the GNU General Public License as published by the Free Software Foundation;
either version 1, or (at your option) any later version, or
=item (b)
the "Artistic License" which comes with Perl.
=back
=cut
EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment