Commit a5d2d63d authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

auto version from commit tag in setup.py

parent ed9e9f3f
Pipeline #7742 passed with stages
in 3 minutes and 31 seconds
......@@ -57,7 +57,7 @@ mftests :
- pip3 install --user dist/*manylinux1_x86_64*
- cd validation
- python3 mbtests.py
- echo 'TAG :' $CI_COMMIT_TAG
- echo 'TAG :' $CI_COMMIT_TAG "TWINE USERNAME " $TWINE_USERNAME
mfdeploy-test :
image : immc/migflow-build:v0.6
......@@ -66,14 +66,16 @@ mfdeploy-test :
- if: '$CI_COMMIT_TAG =~ /^w-.*$/'
when: always
script:
- echo 'TAG :' $CI_COMMIT_TAG "TWINE USERNAME " $TWINE_USERNAME
- twine upload --repository testpypi dist/*
mfdeploy :
image : immc/migflow-build:v0.6
stage : deploy
script:
- twine upload dist/*
rules :
- if: '$CI_COMMIT_TAG =~ "/^v-.*/"'
- if: '$CI_COMMIT_TAG =~ /^v-.*$/'
when: always
script:
- echo 'TAG :' $CI_COMMIT_TAG "TWINE USERNAME " $TWINE_USERNAME
- twine upload dist/*
......@@ -20,13 +20,20 @@
# see <http://www.gnu.org/licenses/>.
import setuptools
import sys
import os
with open("README.md", "r") as fh:
long_description = fh.read()
version = "1.1.4"
commit_tag = os.environ.get("CI_COMMIT_TAG")
if commit_tag and (commit_tag.startswith("v-") or commit_tag.startswith("w-")):
version = commit_tag[2:]
setuptools.setup(
name="migflow",
version="1.1.4",
version=version,
author="Migflow Team",
author_email="jonathan.lambrechts@uclouvain.be",
description="Model for Immersed Granular Flows",
......
Markdown is supported
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