From ff9b30dc2e3c745a450ef265f85b9aa5c3202af0 Mon Sep 17 00:00:00 2001
From: Burak Hancerli <burak.hancerli@qt.io>
Date: Tue, 4 Jun 2024 10:29:34 +0200
Subject: [PATCH] cicd: fix the packaging step

---
 cicd/stages/release.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cicd/stages/release.yml b/cicd/stages/release.yml
index 5e875f8..3e06feb 100644
--- a/cicd/stages/release.yml
+++ b/cicd/stages/release.yml
@@ -15,8 +15,7 @@ create-packages:
     QDS_PACKAGE_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/qt-ui-viewer/${CI_COMMIT_TAG}"
     GIT_SUBMODULE_STRATEGY: none
   script:
-    - apk add tar curl bash
-    - bash
+    - apk add tar curl
     - echo ${QDS_CI_ARTIFACTS_PATH}; ls -l ${QDS_CI_ARTIFACTS_PATH}
     - ls -l ${QDS_CI_ARTIFACTS_PATH}/*
     - cd ${QDS_CI_ARTIFACTS_PATH}
@@ -26,11 +25,12 @@ create-packages:
           # app folder contains the apk for the app
           # test folder contains the apk for the tests
           # we only need to compress the app folder
-          pushd "${arch}/app"
+          current_dir=$(pwd)
+          cd "${arch}/app"
           tar -czf "${arch}.tar.gz" *
           echo "Uploading ${arch}.tar.gz to GitLab Package Registry"
           curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${arch}.tar.gz" ${QDS_PACKAGE_URL}/qt-ui-viewer-${CI_COMMIT_TAG}-qt${QDS_CI_QT_VERSION}-${arch}.tar.gz
-          popd
+          cd ${current_dir}
       done
   artifacts:
     name: qt-ui-viewer-${CI_JOB_ID}-qt${QDS_CI_QT_VERSION}
-- 
GitLab