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 5
5
- build
6
6
- deploy
7
7
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
10
14
11
15
12
16
# ##################
@@ -25,10 +29,7 @@ unit-tests:
25
29
build-package :
26
30
stage : build
27
31
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
32
33
- python3 setup.py sdist bdist_wheel
33
34
artifacts :
34
35
paths :
@@ -38,16 +39,14 @@ build-package:
38
39
- master
39
40
- tags
40
41
42
+
41
43
# ##################
42
44
# Deploy
43
45
# ##################
44
46
deploy-package :
45
47
stage : deploy
46
48
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
51
50
- echo -e "$PYPI" > ~/.pypirc
52
51
- pip install twine
53
52
- twine upload dist/* -r pypi
You can’t perform that action at this time.
0 commit comments