mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
fix code blocks and version parsing
This commit is contained in:
2
Makefile
2
Makefile
@ -80,7 +80,7 @@ package-test: clean
|
|||||||
|
|
||||||
notes: check-bump
|
notes: check-bump
|
||||||
# Let UPCOMING_VERSION be the version that is used for the current bump
|
# Let UPCOMING_VERSION be the version that is used for the current bump
|
||||||
$(eval UPCOMING_VERSION=$(shell bump-my-version show --increment $(bump) new_version))
|
$(eval UPCOMING_VERSION=$(shell bump-my-version bump --dry-run $(bump) -v | awk -F"'" '/New version will be / {print $$2}'))
|
||||||
# Now generate the release notes to have them included in the release commit
|
# Now generate the release notes to have them included in the release commit
|
||||||
towncrier build --yes --version $(UPCOMING_VERSION)
|
towncrier build --yes --version $(UPCOMING_VERSION)
|
||||||
# Before we bump the version, make sure that the towncrier-generated docs will build
|
# Before we bump the version, make sure that the towncrier-generated docs will build
|
||||||
|
|||||||
@ -12,12 +12,14 @@ To get started, fork the repository to your own github account, then clone it to
|
|||||||
development machine:
|
development machine:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
git clone git@github.com:your-github-username/<REPO_NAME>.git
|
git clone git@github.com:your-github-username/<REPO_NAME>.git
|
||||||
|
|
||||||
Next, install the development dependencies. We recommend using a virtual environment,
|
Next, install the development dependencies. We recommend using a virtual environment,
|
||||||
such as `virtualenv <https://virtualenv.pypa.io/en/stable/>`_.
|
such as `virtualenv <https://virtualenv.pypa.io/en/stable/>`_.
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
cd <REPO_NAME>
|
cd <REPO_NAME>
|
||||||
virtualenv -p python venv
|
virtualenv -p python venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
@ -32,6 +34,7 @@ A great way to explore the code base is to run the tests.
|
|||||||
We can run all tests with:
|
We can run all tests with:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
pytest tests
|
pytest tests
|
||||||
|
|
||||||
Code Style
|
Code Style
|
||||||
@ -42,6 +45,7 @@ the library. This tool runs automatically with every commit, but you can also ru
|
|||||||
manually with:
|
manually with:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
make lint
|
make lint
|
||||||
|
|
||||||
If you need to make a commit that skips the ``pre-commit`` checks, you can do so with
|
If you need to make a commit that skips the ``pre-commit`` checks, you can do so with
|
||||||
@ -91,6 +95,7 @@ Final test before each release
|
|||||||
Before releasing a new version, build and test the package that will be released:
|
Before releasing a new version, build and test the package that will be released:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
git checkout main && git pull
|
git checkout main && git pull
|
||||||
make package-test
|
make package-test
|
||||||
|
|
||||||
@ -100,6 +105,7 @@ the instructions to activate the venv and test whatever you think is important.
|
|||||||
You can also preview the release notes:
|
You can also preview the release notes:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
towncrier --draft
|
towncrier --draft
|
||||||
|
|
||||||
Build the release notes
|
Build the release notes
|
||||||
@ -110,6 +116,7 @@ the version to bump (see below), which changes how the version number will show
|
|||||||
release notes.
|
release notes.
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
make notes bump=$$VERSION_PART_TO_BUMP$$
|
make notes bump=$$VERSION_PART_TO_BUMP$$
|
||||||
|
|
||||||
If there are any errors, be sure to re-run make notes until it works.
|
If there are any errors, be sure to re-run make notes until it works.
|
||||||
@ -120,6 +127,7 @@ Push the release to github & pypi
|
|||||||
After confirming that the release package looks okay, release a new version:
|
After confirming that the release package looks okay, release a new version:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
make release bump=$$VERSION_PART_TO_BUMP$$
|
make release bump=$$VERSION_PART_TO_BUMP$$
|
||||||
|
|
||||||
This command will:
|
This command will:
|
||||||
|
|||||||
Reference in New Issue
Block a user