From 0b362a83fb5dd55f67b9d351551d0c18e7f3229a Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 22 Mar 2020 00:00:01 +0000 Subject: [PATCH] gh-pages --- .gitignore | 1 + push-mirrors | 61 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 89113c0..d03d5da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /README.html +/out # NPM README /README diff --git a/push-mirrors b/push-mirrors index 286ca5c..e10240f 100755 --- a/push-mirrors +++ b/push-mirrors @@ -4,29 +4,44 @@ set -eux +## Git mirrors. +#git push git@gitlab.com:cirosantilli/china-dictatorship.git +#git push git@bitbucket.org:cirosantilli/china-dictatorship.git + make -# NPM package. -# Updates package.json version, which other systems read if possible. -new_version="$(./push-mirrors-bump-package-json-version)" -npm publish -git add package.json +# GitHub pages. +gh_pages_dir=out/gh-pages +# One time initial setup. +# git checkout --orphan gh-pages +# and copy over https://github.com/cirosantilli/jekyll-min +if [ ! -d "$gh_pages_dir" ]; then + mkdir -p "$gh_pages_dir" + git clone . "$gh_pages_dir" +fi +cp README.html "$gh_pages_dir" +git -C "$gh_pages_dir" add "README.html" +git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")" +git -C "$gh_pages_dir" push -# Python package. -./push-mirrors-bump-setup-py-version -# Initial one time setup. -#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. -twine upload dist/* -rm -rf build dist *.egg-info -git add setup.py - -# Bump package versions -git tag -m "$new_version" "$new_version" -git commit -m 'bump package version' -git push --follow-tags - -git push git@gitlab.com:cirosantilli/china-dictatorship.git -git push git@bitbucket.org:cirosantilli/china-dictatorship.git +## NPM package. +## Updates package.json version, which other systems read if possible. +#new_version="$(./push-mirrors-bump-package-json-version)" +#npm publish +#git add package.json +# +## Python package. +#./push-mirrors-bump-setup-py-version +## Initial one time setup. +##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. +#twine upload dist/* +#rm -rf build dist *.egg-info +#git add setup.py +# +## Bump package versions +#git tag -m "$new_version" "$new_version" +#git commit -m 'bump package version' +#git push --follow-tags