Last active
March 10, 2020 20:58
-
-
Save jmsktm/888f166c56ea6536df44405ddf669f59 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import os | |
path = "/home/james/Github" | |
def exec(command): | |
print("Executing Command: {}".format(command)) | |
os.system(command) | |
def main(): | |
for dir in os.listdir(path): | |
dir_path = "{}/{}".format(path, dir) | |
os.chdir(dir_path) | |
exec("pwd") | |
exec("git pull origin master") | |
exec("docker-compose build && docker-compose up -d") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment