Skip to content
Snippets Groups Projects
Unverified Commit 70507024 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Add publish-only support to publisher


Set publish-only to binaries or sources to only enable publishing
binaries or sources but not both.

Signed-off-by: Andrej Shadura's avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
parent 457e3bbd
No related branches found
No related tags found
2 merge requests!102Sync production and staging branches,!98Add publish-only support to publisher
Pipeline #142485 passed
......@@ -80,7 +80,7 @@ RUN rm -rf $WORKDIR && mkdir -p $WORKDIR/stamp
FROM rust:1.87-bullseye as aptly-tools-builder
RUN git clone https://github.com/collabora/aptly-rest-tools \
-b v0.0.5 --depth=1 \
-b v0.0.6 --depth=1 \
/tmp/aptly-rest-tools
WORKDIR /tmp/aptly-rest-tools
RUN cargo build --release
......
......@@ -56,6 +56,7 @@ BEGIN {
$repo_config->{'aptly-server'} ||= $target_config->{'server'};
$repo_config->{'gpg-key'} ||= $target_config->{'gpg-key'};
$repo_config->{'prefix'} ||= $target_config->{'prefix'};
$repo_config->{'publish-only'} ||= $target_config->{'publish-only'};
}
die "$projid/$repoid does not have either aptly-server or target defined" if !defined $repo_config->{'aptly-server'};
......@@ -118,7 +119,9 @@ sub aptlyctl {
sub obs2aptly($projid, $repoid, $extrep) {
my $repo_config = aptly_repo_get_config($projid, $repoid);
return check_exit_code(api_tool_exec($repo_config->{'aptly-server'}, 'obs2aptly', "$projid/$repoid", $extrep));
my @args = ("$projid/$repoid", $extrep);
push @args, "--only=$repo_config->{'publish-only'}" if ($repo_config->{'publish-only'});
return check_exit_code(api_tool_exec($repo_config->{'aptly-server'}, 'obs2aptly', @args));
}
# Aptly configuration helpers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment