Skip to content

Commit

Permalink
Move the deploy_package script to a directory to contain build_scripts
Browse files Browse the repository at this point in the history
Add a script to update the redis server stored in the redis.submodule directory.
  • Loading branch information
dwighthubbard committed Nov 27, 2015
1 parent 8ab138a commit 426dd34
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
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 426dd34

Please sign in to comment.