-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 Create deploy py script to clone repos
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
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
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']}") | ||
|