File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 55 - build
66 - deploy
77
8- before_script :
9- - apk --no-cache add gettext
8+ .set_version : &set_version |
9+ apk --no-cache add gettext
10+ VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed "s/v//")
11+ export VERSION=$VERSION
12+ envsubst '${VERSION}' < setup.py > setup.py.new
13+ mv setup.py.new setup.py
1014
1115
1216# ##################
@@ -25,10 +29,7 @@ unit-tests:
2529build-package :
2630 stage : build
2731 script :
28- - VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed "s/v//")
29- - export VERSION=$VERSION
30- - envsubst '${VERSION}' < setup.py > setup.py.new
31- - mv setup.py.new setup.py
32+ - *set_version
3233 - python3 setup.py sdist bdist_wheel
3334 artifacts :
3435 paths :
@@ -38,16 +39,14 @@ build-package:
3839 - master
3940 - tags
4041
42+
4143# ##################
4244# Deploy
4345# ##################
4446deploy-package :
4547 stage : deploy
4648 script :
47- - VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed "s/v//")
48- - export VERSION=$VERSION
49- - envsubst '${VERSION}' < setup.py > setup.py.new
50- - mv setup.py.new setup.py
49+ - *set_version
5150 - echo -e "$PYPI" > ~/.pypirc
5251 - pip install twine
5352 - twine upload dist/* -r pypi
You can’t perform that action at this time.
0 commit comments