create package target (#898)

* create package target

the peps are built... may as well publish a tarball directly from travis.

python.org hosting is being updated and i'm trying to move it away from local
disk storage, which the current pep integration relies on.

this will allow me python.org to pull the tarball out of S3 and do it's work.

* packager: push to s3 after success
This commit is contained in:
Ernest W. Durbin III 2019-02-23 13:02:57 -05:00 committed by GitHub
parent 83687f6ee3
commit b91c65043d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,9 +1,12 @@
pep-0000.txt
pep-0000.rst
pep-????.html
peps.rss
__pycache__
*.pyc
*.pyo
*~
*env
.vscode
*.swp
/build

View File

@ -9,3 +9,7 @@ before_install:
- pip install docutils
script:
- make -j
after_success:
- test $TRAVIS_BRANCH = "master" &&
make upload

View File

@ -34,6 +34,7 @@ clean:
-rm pep-0000.rst
-rm pep-0000.txt
-rm *.html
-rm -rf build
update:
git pull https://github.com/python/peps.git
@ -41,3 +42,15 @@ update:
venv:
$(PYTHON) -m venv venv
./venv/bin/python -m pip install -U docutils
package: all rss
mkdir -p build/peps
cp *.html build/peps/
cp *.png build/peps/
cp *.rss build/peps/
tar -C build -czf build/peps.tar.gz peps
upload: venv package
./venv/bin/python -m pip install awscli
./venv/bin/aws s3 cp --acl public-read build/peps.tar.gz s3://pythondotorg-assets-staging/peps.tar.gz
./venv/bin/aws s3 cp --acl public-read build/peps.tar.gz s3://pythondotorg-assets/peps.tar.gz