From b91c65043d69a2b5304617d95c77ab94f30ec5fb Mon Sep 17 00:00:00 2001 From: "Ernest W. Durbin III" Date: Sat, 23 Feb 2019 13:02:57 -0500 Subject: [PATCH] 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 --- .gitignore | 3 +++ .travis.yml | 4 ++++ Makefile | 13 +++++++++++++ 3 files changed, 20 insertions(+) diff --git a/.gitignore b/.gitignore index dd23b584a..0be4dea5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ pep-0000.txt pep-0000.rst pep-????.html +peps.rss __pycache__ *.pyc *.pyo *~ *env .vscode +*.swp +/build diff --git a/.travis.yml b/.travis.yml index b19f1f700..d98622dc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,7 @@ before_install: - pip install docutils script: - make -j + +after_success: + - test $TRAVIS_BRANCH = "master" && + make upload diff --git a/Makefile b/Makefile index 30d7da0ed..377cf7f7c 100644 --- a/Makefile +++ b/Makefile @@ -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