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 ...@@ -18,7 +18,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
GIT_STRATEGY: none GIT_STRATEGY: none
tags: tags:
- github - github
script: after_script:
- rm -rf ./* - rm -rf ./*
- rm -rf .git - rm -rf .git
- git clone --mirror $CI_REPOSITORY_URL . - git clone --mirror $CI_REPOSITORY_URL .
...@@ -49,16 +49,6 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4 ...@@ -49,16 +49,6 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
- setup.py - setup.py
- tests/**/*.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 # TASKS
format: format:
<<: *pyenv <<: *pyenv
...@@ -89,26 +79,32 @@ check: ...@@ -89,26 +79,32 @@ check:
- make mypy - make mypy
- make pylint - make pylint
build: &build build:
<<: *pyenv <<: *pyenv
<<: *changes <<: *changes
stage: build stage: build
script: script:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install wheel - pip install -r requirements_deploy.txt
- python setup.py sdist bdist_wheel - make build
releases: releases:
<<: *pyenv <<: *pyenv
<<: *build
<<: *release_pip
<<: *push_to_github <<: *push_to_github
stage: release stage: release
when: manual when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy PYPI_PASSWORD=${PYPI_PASSWORD}
release_test: release_test:
<<: *pyenv <<: *pyenv
<<: *build
<<: *release_pip_test
stage: release stage: release
when: manual 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: ...@@ -34,3 +34,15 @@ format:
black duniterpy black duniterpy
black tests black tests
black examples 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 ...@@ -105,21 +105,23 @@ Packaging and deploy
Pypi 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 and commit and tag the new version number (semantic version number)::
Change the version number (semantic version number)::
./release.sh 0.42.3 ./release.sh 0.42.3
Build the Pypi package in the ``dist`` folder:: 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