From e9726d1d3d9487ada1ac539d1ae10f5538dd7cea Mon Sep 17 00:00:00 2001
From: istmxrein <maximilian.reinheimer@stud.h-da.de>
Date: Wed, 20 Sep 2023 16:48:53 +0200
Subject: [PATCH] upload packages to artifact server

---
 .gitlab-ci.yml | 7 +++++++
 setup.py       | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5b0e2b6..94b80a7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,4 +4,11 @@ run:
   script:
     - pip install build twine
     - python setup.py sdist bdist_wheel
+    - ls -al
     - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
+    - | 
+      for file in pilab-*; do 
+        if [[ -f "$file" ]]; then
+          curl -L --fail -T $file "https://artifact.pi-lab.users.h-da.cloud/files/" -u ${ARTIFACT_SERVER_TOKEN}
+        fi
+      done
diff --git a/setup.py b/setup.py
index 57f612e..dfe2c40 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 
 setup(
     name='pilab',
-    version='3.5.2',
+    version='3.5.3',
     description='Shared-Libs for the pi-lab microservices',
     url='https://code.fbi.h-da.de/api/v4/projects/27896/packages/pypi/pilab',
     author='Max Reinheimer',
-- 
GitLab