forked from cirosantilli/china-dictatorship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push-mirrors
executable file
·38 lines (32 loc) · 1.19 KB
/
push-mirrors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# https://github.com/cirosantilli/china-dictatorship#mirrors
set -eux
# 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"
./push-gh-pages
# NPM package.
# Updates package.json version, which other systems read if possible.
npm publish
# 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
python setup.py sdist bdist_wheel
# 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
# Push to git mirrors.
git push [email protected]:cirosantilli/china-dictatorship.git
git push [email protected]:cirosantilli/china-dictatorship.git
# Nah.
#git push https://gitee.com/cirosantilli/china-dictatorship.git