Skip to content

Instantly share code, notes, and snippets.

@jmsktm
Last active March 10, 2020 20:58
Show Gist options
  • Save jmsktm/888f166c56ea6536df44405ddf669f59 to your computer and use it in GitHub Desktop.
Save jmsktm/888f166c56ea6536df44405ddf669f59 to your computer and use it in GitHub Desktop.
#!/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