-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Makefile for release #96
Open
stsewd
wants to merge
1
commit into
main
Choose a base branch
from
add-make
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
release: clean | ||
git checkout master | ||
git pull origin master | ||
python setup.py sdist bdist_wheel | ||
python -m twine upload --sign --identity [email protected] dist/* | ||
|
||
tag: | ||
git checkout master | ||
git pull origin master | ||
git tag `python -c "print(__import__('readthedocs_ext').__version__)"` | ||
git push --tags | ||
|
||
clean: | ||
rm -rf dist/ | ||
|
||
.PHONY: release clean tag | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ Read the Docs Sphinx Extensions | |
|
||
.. image:: https://img.shields.io/pypi/v/readthedocs-sphinx-ext.svg | ||
:target: https://pypi.python.org/pypi/readthedocs-sphinx-ext | ||
:alt: Pypi Version | ||
.. image:: https://travis-ci.org/readthedocs/readthedocs-sphinx-ext.svg?branch=master | ||
:target: https://travis-ci.org/readthedocs/readthedocs-sphinx-ext | ||
:alt: Pypi Version | ||
.. image:: https://circleci.com/gh/readthedocs/readthedocs-sphinx-ext.svg?style=svg | ||
:target: https://circleci.com/gh/readthedocs/readthedocs-sphinx-ext | ||
:alt: Build Status | ||
|
||
This module adds extensions that make Sphinx easier to use. | ||
|
@@ -21,13 +21,11 @@ We currently ship: | |
Releasing | ||
--------- | ||
|
||
#. Increment the version in ``setup.py`` | ||
#. Tag the release in git: ``git tag $NEW_VERSION``. | ||
#. Push the tag to GitHub: ``git push --tags origin master`` | ||
#. Upload the package to PyPI: | ||
#. Increment the version in ``readthedocs_ext.__init__.py`` | ||
#. Open a PR with the changes | ||
#. To create a tag and push to PyPI run: | ||
|
||
.. code:: bash | ||
.. code:: bash | ||
|
||
$ rm -rf dist/ | ||
$ python setup.py sdist bdist_wheel | ||
$ twine upload --sign --identity [email protected] dist/* | ||
make tag | ||
make release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '2.1.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import codecs | ||
|
||
from setuptools import setup, find_packages | ||
from setuptools import find_packages, setup | ||
|
||
from readthedocs_ext import __version__ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're using bump version on the theme and I'd like to start using that on all of our projects. It's a solution that doesn't require importing or reading files to get the version number, and allows us to standardize on |
||
|
||
setup( | ||
name='readthedocs-sphinx-ext', | ||
version='2.1.3', | ||
version=__version__, | ||
author='Read the Docs, Inc', | ||
author_email='[email protected]', | ||
url='http://github.com/readthedocs/readthedocs-sphinx-ext', | ||
|
@@ -14,7 +16,6 @@ | |
package_dir={'': '.'}, | ||
packages=find_packages('.', exclude=['tests']), | ||
long_description=codecs.open("README.rst", "r", "utf-8").read(), | ||
# trying to add files... | ||
include_package_data=True, | ||
package_data={ | ||
'': ['_static/*.js', '_static/*.js_t', '_static/*.css', '_templates/*.tmpl'], | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good improvement. I would like to settle on more common tooling patterns across our repos going forward though. On the other repos we're using
inv
for this, which I quite like. That could maybe be a next step though. I'm generally a fan ofmake
otherwise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on standardization. I see that
release
depends onclean
- not sure if invoke supports that sort of dependency tracking though. Brett Cannon asked on Twitter the other day and after a few recommendations, he went for doit https://twitter.com/brettsky/status/1382122878225686529There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we already using invoke for this? All our .org release tooling is built on it, so we should definitely standardize on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@astrojuanlu yeah,
doit
helps a lot with cached dependencies too. However,invoke
supports pre-tasks http://docs.pyinvoke.org/en/latest/getting-started.html?highlight=pre#declaring-pre-tasksI'm also 👍🏼 to avoid makefile and use
invoke
here.