Commit 978c54b0 authored by gregor herrmann's avatar gregor herrmann

Switch from debian/upstream to debian/upstream/metadata

in several places.
parent bdf09d4a
......@@ -103,7 +103,7 @@ See L<dpt-checkout(1)>.
See L<dpt-dch-note(1)>.
=item B<debian-upstream> - create debian/upstream file from META.{json,yml}
=item B<debian-upstream> - create debian/upstream/metadata file from META.{json,yml}
See L<dpt-debian-upstream(1)>.
......
......@@ -30,13 +30,14 @@ foreach ( keys %{$upstream} ) {
delete $upstream->{$_} unless defined $upstream->{$_};
}
DumpFile('debian/upstream', $upstream);
mkdir('debian/upstream');
DumpFile( 'debian/upstream/metadata', $upstream );
=pod
=head1 NAME
dpt-debian-upstream - convert resources from META.{json,yml} to debian/upstream
dpt-debian-upstream - convert resources from META.{json,yml} to debian/upstream/metadata
=head1 SYNOPSIS
......@@ -45,7 +46,7 @@ B<dpt debian-upstream>
=head1 DESCRIPTION
B<dpt debian-upstream> reads information from F<META.json> or F<META.yml> and
writes them to F<debian/upstream>, according to the UpstreamMetaData
writes them to F<debian/upstream/metadata>, according to the UpstreamMetaData
specification.
=head1 SEE ALSO
......
......@@ -25,23 +25,23 @@ if ! git remote show | grep -qx upstream-repo ; then
REPO=$(perl -MDebian::Copyright -E '$c = Debian::Copyright->new(); $c->read("debian/copyright"); say $c->header()->Source' | grep -oE "git(?:+ssh)?:.+$" || true)
# case 2: Repository in d/upstream
if [ -z "$REPO" -a ! -e debian/upstream ] ; then
warn "No 'debian/upstream' file found, trying to create it ..."
if [ -z "$REPO" -a ! -e debian/upstream/metadata ] ; then
warn "No 'debian/upstream/metadata' file found, trying to create it ..."
dpt debian-upstream || true
if [ -e debian/upstream ] ; then
git add debian/upstream
git commit -m "Add debian/upstream"
if [ -e debian/upstream/metadata ] ; then
git add debian/upstream/metadata
git commit -m "Add debian/upstream/metadata"
fi
fi
if [ -z "$REPO" -a -e debian/upstream ] ; then
REPO=$(awk '/^Repository:.*git(\+ssh)?:.+/ {print $2;}' debian/upstream || true)
if [ -z "$REPO" -a -e debian/upstream/metadata ] ; then
REPO=$(awk '/^Repository:.*git(\+ssh)?:.+/ {print $2;}' debian/upstream/metadata || true)
fi
if [ -n "$REPO" ] ; then
warn "Adding Git remote 'upstream-repo' with URL '$REPO' ..."
git remote add upstream-repo "$REPO"
else
warn "No upstream Git URL found in 'debian/copyright' or 'debian/upstream'. Run 'git remote add upstream-repo <URL>' manually to track upstream."
warn "No upstream Git URL found in 'debian/copyright' or 'debian/upstream/metadata'. Run 'git remote add upstream-repo <URL>' manually to track upstream."
fi
else
warn "Found git remote 'upstream-repo':"
......@@ -61,10 +61,10 @@ B<dpt upstream-repo>
B<dpt upstream-repo> adds the upstream Git repository as a B<git remote>
named I<upstream-repo>. The URL for the repository is read from either
F<debian/copyright>'s I<Source> field or from F<debian/upstream>'s
F<debian/copyright>'s I<Source> field or from F<debian/upstream/metadata>'s
I<Repository> field.
In case there's no Git URL in F<debian/copyright> and F<debian/upstream>
In case there's no Git URL in F<debian/copyright> and F<debian/upstream/metadata>
doesn't exist, the latter is created with L<dpt-debian-upstream(1)>.
=head1 SEE ALSO
......
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