-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the deploy_package script to a directory to contain build_scripts
Add a script to update the redis server stored in the redis.submodule directory.
- Loading branch information
1 parent
8ab138a
commit 426dd34
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |