-
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.
Merge pull request #89 from yahoo/update_redis_server
Move the deploy_package script to a directory to contain build_scripts
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
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
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') |