Files
china-dictatorship/push-mirrors

40 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
2020-03-17 00:00:09 +00:00
2021-04-28 03:00:02 +00:00
# Create a tag and push to EVERY supported mirror.
2020-03-17 00:00:09 +00:00
# https://github.com/cirosantilli/china-dictatorship#mirrors
2020-03-17 00:00:06 +00:00
set -eux
2020-03-17 00:00:09 +00:00
2020-09-15 02:00:01 +00:00
# Update repo.
new_version="$(./push-mirrors-bump-package-json-version)"
./push-mirrors-bump-setup-py-version
git add package.json
git add setup.py
git commit -m 'bump package version'
git tag -m "$new_version" "$new_version"
2021-04-29 02:00:01 +00:00
./push
2020-03-17 00:00:09 +00:00
2020-03-22 00:00:03 +00:00
# NPM package.
# Updates package.json version, which other systems read if possible.
npm publish
2020-06-15 03:00:02 +00:00
# Python package.
# Initial setup:
#sudo apt install python3-testresources
#python3 -m pip install --user --upgrade setuptools wheel
# Initial one time setup.
#python3 -m pip install --user setuptools wheel twine
cp README.adoc README.html china_dictatorship
python3 setup.py sdist bdist_wheel
2020-08-04 06:00:05 +00:00
# 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
2020-06-15 03:00:02 +00:00
twine upload dist/*
rm -rf build dist *.egg-info
2021-04-28 03:00:02 +00:00
# Push to other git mirrors.
2020-06-15 03:00:02 +00:00
git push git@bitbucket.org:cirosantilli/china-dictatorship.git
2021-04-28 03:00:02 +00:00
git push git@gitlab.binets.fr:ciro.duran-santilli/china-dictatorship.git
2020-08-21 01:00:00 +00:00
# Nah.
#git push https://gitee.com/cirosantilli/china-dictatorship.git