Commit eb1936ae authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

fix installs

parent 14e10c7e
...@@ -16,7 +16,7 @@ build-job: ...@@ -16,7 +16,7 @@ build-job:
script: script:
- apt-get update -y -qq - apt-get update -y -qq
- apt-get install -y -qq python3-dev python3-pip - apt-get install -y -qq python3-dev python3-pip
- pip install twine setuptools wheel - pip install setuptools wheel
- python3 setup.py sdist bdist_wheel - python3 setup.py sdist bdist_wheel
artifacts: artifacts:
...@@ -50,6 +50,7 @@ upload-job: ...@@ -50,6 +50,7 @@ upload-job:
script: script:
- apt-get update -y -qq - apt-get update -y -qq
- apt-get install -y -qq curl jq --fix-missing - apt-get install -y -qq curl jq --fix-missing
- apt-get install -y -qq python3-dev python3-pip
# get the version that is being installed # get the version that is being installed
- 'export version=$(grep -oP "(?<=__version__ = ).*" ./pymagglobal/__init__.py)' - 'export version=$(grep -oP "(?<=__version__ = ).*" ./pymagglobal/__init__.py)'
- 'export version=${version:1:-1}' - 'export version=${version:1:-1}'
...@@ -59,6 +60,8 @@ upload-job: ...@@ -59,6 +60,8 @@ upload-job:
- 'echo $ID' - 'echo $ID'
# remove the package, as we want a new build even if the version number did not change # remove the package, as we want a new build even if the version number did not change
- 'curl --max-time 900 --connect-timeout 120 --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"' - 'curl --max-time 900 --connect-timeout 120 --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
# install twine
- pip install twine
# upload # upload
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* --verbose - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* --verbose
only: only:
......
Supports Markdown
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