summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-04-03 16:01:14 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-04-03 16:01:14 -0700
commit753a639aa368adbb053f9e8362c6e7bd71db5f55 (patch)
tree0819536650e8de397b8d444b54c17bd1cc35ed4f
parentca2896b9ba6d956be5768db0c35f75a040cb28e3 (diff)
downloaddotfiles-753a639aa368adbb053f9e8362c6e7bd71db5f55.tar.gz
rework
-rwxr-xr-xbin/buildssrht-preupload29
1 files changed, 12 insertions, 17 deletions
diff --git a/bin/buildssrht-preupload b/bin/buildssrht-preupload
index 347aa771..12751693 100755
--- a/bin/buildssrht-preupload
+++ b/bin/buildssrht-preupload
@@ -44,14 +44,17 @@ chomp(my $source = `dpkg-parsechangelog -SSource`);
chomp(my $version = `dpkg-parsechangelog -SVersion`);
my $note = "Pre-upload checks for $source $version";
-my $chroot = "$dist-amd64-sbuild";
+my $schroot = "$dist-amd64-sbuild";
my $changes = "${source}_${version}_multi.changes";
my $manifest->{image} = "debian/unstable";
$manifest->{sources} = [$clone_uri];
$manifest->{packages}
= ["autopkgtest", "devscripts", "dgit", "lintian", "piuparts", "sbuild"];
-my @tasks = ({
+
+$manifest->{tasks} = [
+ map +({ $_->[0] => join "\n", $_->[1]->@*, "" }),
+ [
setup => [
"cd $source",
"git deborig || origtargz",
@@ -62,28 +65,20 @@ my @tasks = ({
--command-prefix=eatmydata
--include=eatmydata),
$dist,
- "/srv/chroot/$chroot"
+ "/srv/chroot/$schroot"
),
"sudo sbuild-adduser \$USER"
]
- },
- {
+ ],
+ [
build => [
"cd $source",
"dgit --quilt=$quilt sbuild -d $dist --no-run-lintian"
]
- },
- { lintian => ["lintian $changes"] },
- {
- piuparts =>
- ["sudo piuparts --no-eatmydata --schroot $chroot foo $changes"]
- },
- {
- autopkgtest => ["autopkgtest $changes -- schroot $chroot"] });
-foreach my $task (@tasks) {
- my ($k, $v) = each %$task;
- push $manifest->{tasks}->@*, { $k => join "\n", @$v, "" };
-}
+ ],
+ [lintian => ["lintian $changes"]],
+ [piuparts => ["sudo piuparts --no-eatmydata --schroot $schroot $changes"]],
+ [autopkgtest => ["autopkgtest $changes -- schroot $schroot"]]];
my $client = REST::Client->new;
$client->setHost("https://builds.sr.ht");