Skip to content

Commit

Permalink
🚀 Create deploy py script to clone repos
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeGdM committed May 1, 2020
1 parent 028a268 commit ef70cd2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from local_settings import PROJECTS_PATH
import os
import json

if not os.path.isdir(PROJECTS_PATH):
os.makedirs(PROJECTS_PATH)

PROJECTS = json.load(open("projects.json", "r"))

for project in PROJECTS:
if not os.path.isdir(f"{PROJECTS_PATH}/repos/{project['slug']}"):
os.system(f"git clone -b {project['branch']} {project['git']} {PROJECTS_PATH}/repos/{project['slug']}")

os.system(f"cd {PROJECTS_PATH}/repos/{project['slug']}; doxygen {PROJECTS_PATH}/repos/{project['slug']}/Doxyfile")

if not os.path.exists(f"{PROJECTS_PATH}/{project['slug']}"):
os.system(f"ln -s {PROJECTS_PATH}/repos/{project['slug']}/docs/Doxygen/html {PROJECTS_PATH}/{project['slug']}")

0 comments on commit ef70cd2

Please sign in to comment.