push-gh-pages
This commit is contained in:
@@ -96,6 +96,14 @@ Update all mirrors in one go with: link:push-mirrors[]:
|
||||
./push-mirrors
|
||||
....
|
||||
|
||||
In particular, that script calls link:push-gh-pages[]:
|
||||
|
||||
....
|
||||
./push-gh-pages
|
||||
....
|
||||
|
||||
which is more lightweight and pushes just to GH Pages, so we are going to be using that more often to avoid overloading package managers too much.
|
||||
|
||||
There is no need to update package versions or add git tags, all of that gets done automatically by the script!
|
||||
|
||||
[[faq]]
|
||||
|
||||
22
push-gh-pages
Executable file
22
push-gh-pages
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://github.com/cirosantilli/china-dictatorship#mirrors
|
||||
|
||||
set -eux
|
||||
make
|
||||
git push --follow-tags
|
||||
|
||||
# GitHub pages.
|
||||
# One time initial setup.
|
||||
# git checkout --orphan gh-pages
|
||||
# and copy over https://github.com/cirosantilli/jekyll-min
|
||||
gh_pages_dir=out/gh-pages
|
||||
if [ ! -d "$gh_pages_dir" ]; then
|
||||
mkdir -p "$gh_pages_dir"
|
||||
git clone --branch gh-pages "$(git remote get-url origin)"
|
||||
fi
|
||||
cp README.html "${gh_pages_dir}/index.html"
|
||||
git -C "$gh_pages_dir" add index.html
|
||||
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
||||
git -C "$gh_pages_dir" push
|
||||
fi
|
||||
21
push-mirrors
21
push-mirrors
@@ -4,22 +4,7 @@
|
||||
|
||||
set -eux
|
||||
|
||||
make
|
||||
|
||||
# GitHub pages.
|
||||
# One time initial setup.
|
||||
# git checkout --orphan gh-pages
|
||||
# and copy over https://github.com/cirosantilli/jekyll-min
|
||||
gh_pages_dir=out/gh-pages
|
||||
if [ ! -d "$gh_pages_dir" ]; then
|
||||
mkdir -p "$gh_pages_dir"
|
||||
git clone --branch gh-pages "$(git remote get-url origin)"
|
||||
fi
|
||||
cp README.html "${gh_pages_dir}/index.html"
|
||||
git -C "$gh_pages_dir" add index.html
|
||||
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
||||
git -C "$gh_pages_dir" push
|
||||
fi
|
||||
./push-gh-pages
|
||||
|
||||
# NPM package.
|
||||
# Updates package.json version, which other systems read if possible.
|
||||
@@ -36,7 +21,9 @@ git add package.json
|
||||
#python3 -m pip install --user setuptools wheel twine
|
||||
cp README.adoc README.html china_dictatorship
|
||||
python setup.py sdist bdist_wheel
|
||||
# Asks for username and password every time, unless you setup ~/.pypirc.
|
||||
# Asks for password every time, unless you setup ~/.pypirc.
|
||||
# But I don't want to put a plaintext password in there.
|
||||
# https://stackoverflow.com/questions/57935191/twine-is-asking-for-my-password-each-time-how-to-use-the-pypirc
|
||||
twine upload dist/*
|
||||
rm -rf build dist *.egg-info
|
||||
git add setup.py
|
||||
|
||||
Reference in New Issue
Block a user