Skip to content
Snippets Groups Projects
Commit ae588a0d authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] #96 fix gitlab-ci errors adding make commands for build and deploy

Add requirements_deploy.txt file
Update build and deploy commands in README accordingly
parent 9eaf56c1
No related branches found
No related tags found
No related merge requests found
Pipeline #5870 passed with warnings
......@@ -18,7 +18,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
GIT_STRATEGY: none
tags:
- github
script:
after_script:
- rm -rf ./*
- rm -rf .git
- git clone --mirror $CI_REPOSITORY_URL .
......@@ -49,16 +49,6 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
- setup.py
- tests/**/*.py
.release_pip: &release_pip
script:
- pip install twine
- twine upload dist/* --username duniter --password $PYPI_PASSWORD
.release_pip_test: &release_pip_test
script:
- pip install twine
- twine upload dist/* --username duniter --password $PYPI_PASSWORD --repository-url https://test.pypi.org/legacy/
# TASKS
format:
<<: *pyenv
......@@ -89,26 +79,32 @@ check:
- make mypy
- make pylint
build: &build
build:
<<: *pyenv
<<: *changes
stage: build
script:
- pip install -r requirements.txt
- pip install wheel
- python setup.py sdist bdist_wheel
- pip install -r requirements_deploy.txt
- make build
releases:
<<: *pyenv
<<: *build
<<: *release_pip
<<: *push_to_github
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy PYPI_PASSWORD=${PYPI_PASSWORD}
release_test:
<<: *pyenv
<<: *build
<<: *release_pip_test
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy_test PYPI_PASSWORD=${PYPI_PASSWORD}
......@@ -34,3 +34,15 @@ format:
black duniterpy
black tests
black examples
# build a whell package in dist folder
build:
python setup.py sdist bdist_wheel
# upload on PyPi repository
deploy:
twine upload dist/* --username duniter --password ${PYPI_PASSWORD}
# upload on PyPi test repository
deploy_test:
twine upload dist/* --username duniter --password ${PYPI_PASSWORD} --repository-url https://test.pypi.org/legacy/
......@@ -105,21 +105,23 @@ Packaging and deploy
Pypi
++++
In the development pyenv environment, install the following tools::
In the development pyenv environment, install the build and deploy tools::
pip install --upgrade pip setuptools wheel
pip install --upgrade -r requirements_deploy.txt
pip install twine
Change the version number (semantic version number)::
Change and commit and tag the new version number (semantic version number)::
./release.sh 0.42.3
Build the Pypi package in the ``dist`` folder::
python setup.py sdist bdist_wheel
make build
Deploy the package on the Pypi test repository (use a space before make to not keep command with password in shell history)::
[SPACE]make deploy_test PYPI_PASSWORD=xxxx
Deploy the package on the Pypi repository::
Deploy the package on the Pypi repository (use a space before make to not keep command with password in shell history)::
twine upload dist/*
[SPACE]make deploy PYPI_PASSWORD=xxxx
setuptools
wheel
twine
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment