Commit 4293b36c authored by sten's avatar sten

split up the release scripting

remove svn changelog script
put lldp in front in the debian description
parent 4efeffb4
......@@ -9,7 +9,7 @@ Package: ladvd
Architecture: any
Depends: adduser, lsb-base, pciutils, ${shlibs:Depends}, ${misc:Depends}
Suggests: lsb-release
Description: minimal CDP/LLDP sender
Description: minimal LLDP/CDP sender
ladvd sends link layer advertisements on all available interfaces.
This makes connected hosts visible on managed switches. By default it
will run as a privilege-separated daemon.
......
#!/usr/bin/env bash
[ -n "${BASE}" ] || . scripts/_init.sh
[ -d ${RELEASE}/debian ] || mkdir -p ${RELEASE}/debian
cd ${RELEASE}/debian
# create debian sources
tgz=$(basename ../*tar.gz)
cp ../${tgz} $(echo ${tgz%.tar.gz}| tr - _).orig.tar.gz
tar xf *tar.gz
cd ${NAME}-*
rsync -av ${BASE}/debian .
dpkg-buildpackage -S -sa
cd ${RELEASE}/debian
rm -rf ${NAME}-*
cd ${BASE}
#!/usr/bin/env bash
set -e
NAME="ladvd"
BASE=$(pwd)
RELEASE="${BASE}/release"
# prepare
hg pull -u
hg log > ${BASE}/doc/ChangeLog
# create release dir
[ -d ${RELEASE} ] && rm -rf ${RELEASE}
mkdir -p ${RELEASE}
#!/usr/bin/env bash
[ -n "${BASE}" ] || . scripts/_init.sh
# create osc repository
mkdir ${RELEASE}/osc.$$
cd ${RELEASE}/osc.$$
osc checkout home:sten-blinkenlights ${NAME}
mv home\:sten-blinkenlights/${NAME} ${RELEASE}/osc
rm -rf ${RELEASE}/osc.$$
cp ${RELEASE}/*.tar.gz ${RELEASE}/osc
cp ${BASE}/rpm/* ${RELEASE}/osc
[ -d ${RELEASE}/debian ] && cp ${RELEASE}/debian/* ${RELEASE}/osc
cd ${BASE}
#!/usr/bin/env bash
[ -n "${BASE}" ] || . scripts/_init.sh
# create dist tarball
autoreconf -fi
./configure
make distcheck
mv *tar.gz ${RELEASE}
# create signature
gpg -ba ${RELEASE}/*tar.gz
#!/usr/bin/perl -w
# a script to munge the output of 'svn log' into something approaching the
# style of a GNU ChangeLog.
#
# to use this, just fill in the 'hackers' hash with the usernames and
# name/emails of the people who work on your project, go to the top level
# of your working copy, and run:
#
# $ svn log | /path/to/gnuify-changelog.pl > ChangeLog
require 5.0;
use strict;
my %hackers = (
"sten" => 'Sten Spans <sten@blinkenlights.nl>',
);
my $parse_next_line = 0;
my $last_line_empty = 0;
my $last_rev = "";
while (my $entry = <>) {
# Axe windows style line endings, since we should try to be consistent, and
# the repos has both styles in its log entries
$entry =~ s/\r\n$/\n/;
# Remove trailing whitespace
$entry =~ s/\s+$/\n/;
my $this_line_empty = $entry eq "\n";
# Avoid duplicate empty lines
next if $this_line_empty and $last_line_empty;
# Don't fail on valid dash-only lines
if ($entry =~ /^-+$/ and length($entry) >= 72) {
# We're at the start of a log entry, so we need to parse the next line
$parse_next_line = 1;
# Check to see if the final line of the commit message was blank,
# if not insert one
print "\n" if $last_rev ne "" and !$last_line_empty;
} elsif ($parse_next_line) {
# Transform from svn style to GNU style
$parse_next_line = 0;
my @parts = split (/ /, $entry);
$last_rev = $parts[0];
my $hacker = $parts[2];
my $tstamp = $parts[4];
# Use alias if we can't resolve to name, email
$hacker = $hackers{$hacker} if defined $hackers{$hacker};
printf "%s %s\n", $tstamp, $hacker;
} elsif ($this_line_empty) {
print "\n";
} else {
print "\t$entry";
}
$last_line_empty = $this_line_empty;
}
# As a HERE doc so it also sets the final changelog's coding
print <<LOCAL;
;; Local Variables:
;; coding: utf-8
;; End:
LOCAL
1;
#!/bin/bash
#!/usr/bin/env bash
BASE=$(pwd)
RELEASE="${BASE}/release"
. scripts/_init.sh
. scripts/_tarball.sh
. scripts/_debian.sh
. scripts/_obs.sh
# prepare
svn -q up
svn log | ${BASE}/scripts/gnuify-changelog.pl > ${BASE}/doc/ChangeLog
autoreconf -fi
tgz=$(basename ${RELEASE}/*tar.gz)
ver=$(echo ${tgz%.tar.gz}| sed s/${NAME}-//)
# create release dir
[ -d ${RELEASE} ] && rm -rf ${RELEASE}
mkdir -p ${RELEASE}/debian
# create dist tarball
./configure
make distcheck
mv *tar.gz ${RELEASE}
# create signature
gpg -ba ${RELEASE}/*tar.gz
# create debian sources
cd ${RELEASE}/debian
tgz=$(basename ../*tar.gz)
cp ../${tgz} $(echo ${tgz%.tar.gz}| tr - _).orig.tar.gz
tar xf *tar.gz
cd ladvd-*
rsync -av ${BASE}/debian . --exclude=.svn
dpkg-buildpackage -S -sa
cd ${RELEASE}/debian
rm -rf ladvd-*
# create osc repository
mkdir ${RELEASE}/osc.$$
cd ${RELEASE}/osc.$$
osc checkout home:sten-blinkenlights ladvd
mv home\:sten-blinkenlights/ladvd ${RELEASE}/osc
rm -rf ${RELEASE}/osc.$$
cp ${RELEASE}/*.tar.gz ${RELEASE}/osc
cp ${BASE}/rpm/* ${RELEASE}/osc
cp ${RELEASE}/debian/* ${RELEASE}/osc
# return to the root
cd ${BASE}
echo for ubuntu uploads run:
echo "cd ${RELEASE}/debian && dput my-ppa ladvd_*_source.changes"
echo for Googlecode uploads run:
echo googlecode_upload -p ${NAME} -s \"The ${ver} Release\" ${RELEASE}/${tgz}
echo for OpenSuSE BuildService uploads run:
echo "cd ${RELEASE}/osc && osc commit"
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