Skip to content

Commit 3a394ca

Browse files
committed
Makefile: a few sanity checks for releasing
Signed-off-by: Elijah Newren <[email protected]>
1 parent 9928b7c commit 3a394ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ update_docs: export COMMIT=$(shell git rev-parse HEAD)
5151
update_docs:
5252
# Sanity check; we'll build docs in a clone of a git repo
5353
test -d ../git
54+
# Sanity check; docs == origin/docs
55+
test -z "$(git rev-parse docs origin/docs | uniq -u)"
5456
# Avoid spurious errors by forcing index to be well formatted, if empty
5557
git read-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 # empty tree
5658
# Symlink git-filter-repo.txt documentation into git and build it
@@ -89,6 +91,8 @@ github_release: update_docs
8991
test -n "$(GITHUB_COM_TOKEN)"
9092
test -n "$(TAGNAME)"
9193
test -n "$$COMMIT"
94+
# Make sure 'jq' is installed
95+
type -p jq
9296
# Tag the release, push it to GitHub
9397
git tag -a -m "filter-repo $(TAGNAME)" $(TAGNAME) $$COMMIT
9498
git push origin $(TAGNAME)
@@ -124,6 +128,7 @@ pypi_release: # Has an implicit dependency on github_release because...
124128
cd release && venv/bin/pip3 install --upgrade setuptools pip
125129
cd release && venv/bin/pip3 install twine wheel
126130
cd release && venv/bin/python3 setup.py sdist bdist_wheel
131+
# Note: hope you remember password for pypi, but username is 'newren'
127132
cd release && venv/bin/twine upload dist/*
128133
# Remove temporary file(s)
129134
cd release && rm -f README.md git-filter-repo git_filter_repo.py

0 commit comments

Comments
 (0)