From 70dd1880879ff238cf432d798c4809d75a0b89af Mon Sep 17 00:00:00 2001 From: Ernest W Durbin III Date: Sat, 23 Feb 2019 12:37:49 -0500 Subject: [PATCH 1/2] 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. --- .gitignore | 3 +++ .travis.yml | 4 ++++ Makefile | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index dd23b584a4c..0be4dea5de6 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 b19f1f70031..07193de7331 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 package diff --git a/Makefile b/Makefile index 30d7da0ed77..677af079e80 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,10 @@ 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 From bdc02a4961d974b977e5601fb909399cbe87b289 Mon Sep 17 00:00:00 2001 From: Ernest W Durbin III Date: Sat, 23 Feb 2019 12:57:07 -0500 Subject: [PATCH 2/2] packager: push to s3 after success --- .travis.yml | 2 +- Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07193de7331..d98622dc762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ script: after_success: - test $TRAVIS_BRANCH = "master" && - make package + make upload diff --git a/Makefile b/Makefile index 677af079e80..377cf7f7c09 100644 --- a/Makefile +++ b/Makefile @@ -49,3 +49,8 @@ package: all rss 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