From b60ba31c21adb01ac2aa1d02e7a16471c6cfebca Mon Sep 17 00:00:00 2001 From: martipoe <130643472+martipoe@users.noreply.github.com> Date: Tue, 29 Apr 2025 12:09:46 +0200 Subject: [PATCH] feat: curl with "--fail" for improved error detection --- recipe/reset_from_gitlab_artifact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/reset_from_gitlab_artifact.php b/recipe/reset_from_gitlab_artifact.php index 9d50f04..396e8f8 100644 --- a/recipe/reset_from_gitlab_artifact.php +++ b/recipe/reset_from_gitlab_artifact.php @@ -21,7 +21,7 @@ if (get('is_argument_host_the_same_as_local_host')) { $activeDir = get('deploy_path') . (testLocally('[ -e {{deploy_path}}/release ]') ? '/release' : '/current'); $activeDir = testLocally('[ -e ' . $activeDir . ' ]') ? $activeDir : get('deploy_path'); - runLocally('cd ' . $activeDir . ' && curl --location --output artifacts.zip --header "PRIVATE-TOKEN: ' . $gitlabApiToken . '" "' . $url . '"'); + runLocally('cd ' . $activeDir . ' && curl --fail --location --output artifacts.zip --header "PRIVATE-TOKEN: ' . $gitlabApiToken . '" "' . $url . '"'); runLocally('cd ' . $activeDir . ' && vendor/bin/dep db:rmdump {{argument_host}} --options=dumpcode:' . $dumpCode . ' --no-interaction'); runLocally('cd ' . $activeDir . ' && unzip -o artifacts.zip'); runLocally('cd ' . $activeDir . ' && mv -n .dep/database/dumps/*dumpcode=' . $dumpCode . '* {{db_storage_path_local}}/');