Skip to content
Snippets Groups Projects
Commit 2c017e35 authored by Juraj Paluba's avatar Juraj Paluba
Browse files

Create setup.cfg and update gitlab ci to create rc tags

parent 831ba3a9
Branches
Tags
2 merge requests!12Merge develop to master,!9Develop
Pipeline #143489 passed
...@@ -27,16 +27,10 @@ build: ...@@ -27,16 +27,10 @@ build:
script: script:
# Get version. Variable CI_COMMIT_TAG is set only when tag was pushed. # Get version. Variable CI_COMMIT_TAG is set only when tag was pushed.
- export LATEST_TAG=$(git describe --abbrev=0) - export LATEST_TAG=$(git describe --abbrev=0)
- export VERSION=$(if [[ "$CI_COMMIT_TAG" == "" ]]; then echo $LATEST_TAG; else echo $CI_COMMIT_TAG; fi) - export VERSION=$(if [[ "$CI_COMMIT_TAG" == "" ]]; then echo ""; else echo $CI_COMMIT_TAG | cut -c 2-; fi)
- export VERSION=$(echo $VERSION | cut -c 2-) - if [[ "$VERSION" != "" ]]; then python3 setup.py setopt --command=metadata --option=version --set-value=$VERSION; fi
- python3 setup.py setopt --command=metadata --option=version --set-value=$VERSION
- echo VERSION=$VERSION - echo VERSION=$VERSION
# Get package filename
- export WHEEL_NAME=$(python3 setup.py --name | tr '-' '_')
- export PACKAGE=$WHEEL_NAME-$VERSION-$PYTHON_TAG-$ABI_TAG-$PLATFORM_TAG.$PACKAGE_EXTENSION
- echo PACKAGE=$PACKAGE
- python3 setup.py bdist_wheel - python3 setup.py bdist_wheel
- echo $PACKAGE > dist/.package-name
only: only:
- branches - branches
- tags - tags
...@@ -51,11 +45,12 @@ deploy: ...@@ -51,11 +45,12 @@ deploy:
TWINE_PASSWORD: '$CI_CUSTOM_REGISTRY_PASSWORD' TWINE_PASSWORD: '$CI_CUSTOM_REGISTRY_PASSWORD'
TWINE_USERNAME: '$CI_CUSTOM_REGISTRY_USER' TWINE_USERNAME: '$CI_CUSTOM_REGISTRY_USER'
script: script:
- export PACKAGE=$(cat dist/.package-name)
- pip3 install twine - pip3 install twine
- python3 -m twine upload --repository-url $KYPO_PYPI_UPLOAD_URL dist/$PACKAGE - python3 -m twine upload --repository-url $KYPO_PYPI_UPLOAD_URL dist/*
dependencies: dependencies:
- build - build
rules: rules:
- if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "develop"
changes:
- setup.cfg
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
[metadata]
version = v0.1.0rc1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment