Merge branch 'jb/release-to-pypi' into master

Signed-off-by: Elijah Newren <newren@gmail.com>
pull/43/head
Elijah Newren 5 years ago
commit b1a35a3057

@ -78,10 +78,14 @@ update_docs:
# Call like this:
# make GITHUB_COM_TOKEN=$KEY TAGNAME=v2.23.0 release
release: export FILEBASE=git-filter-repo-$(shell echo $(TAGNAME) | tail -c +2)
release: export GIT_INDEX_FILE=$(shell mktemp)
release: export COMMIT=$(shell git rev-parse HEAD)
release: update_docs
release: github_release pypi_release
# Call like this:
# make GITHUB_COM_TOKEN=$KEY TAGNAME=v2.23.0 github_release
github_release: export FILEBASE=git-filter-repo-$(shell echo $(TAGNAME) | tail -c +2)
github_release: export GIT_INDEX_FILE=$(shell mktemp)
github_release: export COMMIT=$(shell git rev-parse HEAD)
github_release: update_docs
test -n "$(GITHUB_COM_TOKEN)"
test -n "$(TAGNAME)"
test -n "$$COMMIT"
@ -114,6 +118,17 @@ release: update_docs
@echo
@echo === filter-repo $(TAGNAME) created and uploaded to GitHub ===
pypi_release: # Has an implicit dependency on github_release because...
# Upload to PyPI, automatically picking tag created by github_release
cd release && python3 -m venv venv
cd release && venv/bin/pip3 install --upgrade setuptools pip
cd release && venv/bin/pip3 install twine wheel
cd release && venv/bin/python3 setup.py sdist bdist_wheel
cd release && venv/bin/twine upload dist/*
# Remove temporary file(s)
cd release && rm -f README.md git-filter-repo git_filter_repo.py
cd release && rm -rf .eggs/ build/ venv/ git_filter_repo.egg-info/
# NOTE TO FUTURE SELF: If you accidentally push a bad release, you can remove
# all but the git-filter-repo-$VERSION.tar.xz asset with
# git push --delete origin $TAGNAME

@ -0,0 +1,32 @@
[metadata]
name = git-filter-repo
url = https://github.com/newren/git-filter-repo
project_urls =
Source = https://github.com/newren/git-filter-repo
Issues = https://github.com/newren/git-filter-repo/issues/
description = Quickly rewrite git repository history
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Development Status :: 4 - Beta
Operating System :: OS Independent
Programming Language :: Python
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
platforms = any
license = MIT
[options]
scripts = git-filter-repo
py_modules = git_filter_repo
python_requires = >= 3.5
setup_requires = setuptools_scm
[bdist_wheel]
universal = 1

@ -0,0 +1,5 @@
from setuptools import setup
import os
for f in ['git-filter-repo', 'git_filter_repo.py', 'README.md']:
os.symlink("../"+f, f)
setup(use_scm_version=dict(root="..", relative_to=__file__))
Loading…
Cancel
Save