Skip to content

Commit

Permalink
gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cirosantilli committed Mar 22, 2020
1 parent 098d7ba commit 0b362a8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/README.html
/out

# NPM README
/README
Expand Down
61 changes: 38 additions & 23 deletions push-mirrors
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,44 @@

set -eux

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
## Git mirrors.
#git push git@gitlab.com:cirosantilli/china-dictatorship.git
#git push git@bitbucket.org:cirosantilli/china-dictatorship.git

# 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
make

# Bump package versions
git tag -m "$new_version" "$new_version"
git commit -m 'bump package version'
git push --follow-tags
# 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

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

0 comments on commit 0b362a8

Please sign in to comment.