Skip to content

Commit

Permalink
Merge pull request #89 from yahoo/update_redis_server
Browse files Browse the repository at this point in the history
Move the deploy_package script to a directory to contain build_scripts
dwighthubbard committed Nov 27, 2015
2 parents 8ab138a + 8d42fbd commit 725815c
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: python
sudo: false
python: 2.7
env:
- TOX_ENV=py27
@@ -13,7 +14,6 @@ matrix:
- TOX_ENV=pypy
- TOX_ENV=build_docs
install:
- sudo apt-get update -qq
- pip install --upgrade pip setuptools tox virtualenv coveralls
script:
- tox -v -v -e $TOX_ENV
File renamed without changes.
21 changes: 21 additions & 0 deletions build_scripts/update_redis_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python3
""" Update the redis.submodule in the redislite repo to the latest stable version """
import os
import shutil
import urllib.request
import tarfile
import tempfile


url = 'http://download.redis.io/releases/redis-stable.tar.gz'


if __name__ == "__main__":
shutil.rmtree('redis.submodule')
with tempfile.TemporaryDirectory() as tempdir:
ftpstream = urllib.request.urlopen(url)
tf = tarfile.open(fileobj=ftpstream, mode="r|gz")
directory = tf.next().name
print(directory)
tf.extractall(tempdir)
shutil.move(os.path.join(tempdir, directory), 'redis.submodule')

0 comments on commit 725815c

Please sign in to comment.