Commit 0e328360 authored by Mattia Rizzolo's avatar Mattia Rizzolo

Merge branch 'salsa-push-always-repo' of salsa.debian.org:yadd/devscripts

MR: !97Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parents 259498c7 321080be
......@@ -16,6 +16,7 @@ devscripts (2.18.12) UNRELEASED; urgency=medium
+ Add libgitlab-api-v4-perl and libtest-output-perl in build dependencies
to enable the salsa unit tests at build time. MR: !94
+ Add a --ci-config-path option. MR: !96
+ push_repo: allow to push even if the project already exists. MR: !97
* uscan:
+ Fix warning when grouped package is up to date.
* French translation update.
......
......@@ -33,9 +33,9 @@ sub create_repo {
. ". Continue (Y/n) "
) =~ refuse
);
my $repo = $self->api->create_project($opts);
unless ($repo) {
ds_warn "Project not created";
my $repo = eval { $self->api->create_project($opts) };
if ($@ or !$repo) {
ds_warn "Project not created: $@";
return 1;
}
ds_warn "Project $repo->{web_url} created";
......
......@@ -48,7 +48,14 @@ sub push_repo {
wait_child => 1,
);
my $res = $self->create_repo($reponame);
return $res if $res;
if ($res) {
return 1
unless (
ds_prompt(
"Project already exists, do you want to try to push local repo? (y/N) "
) =~ accept
);
}
spawn(
exec =>
['git', 'push', '--all', '--verbose', '--set-upstream', 'origin'],
......
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