This commit is contained in:
chendelin1982 2021-09-26 23:05:59 +08:00
parent 2c04627f8d
commit 65500eb06e
3 changed files with 21 additions and 6 deletions

View file

@ -1,12 +1,26 @@
import model
import model, os
path_repo = "./data/application.list"
path_project = ""
# for Git clone HA
github_url = ("https://github.com", "https://github.com.cnpmjs.org", "https://hub.fastgit.org")
class Print:
def __init__(self):
pass
def printRepo():
model.FileOp.printJson(path_repo)
model.FileOp.printJson(path_repo)
class Github:
def __init__(self):
pass
def gitClone(name: str):
cmd = "git clone --depth=1 " + model.SmoothUrl.res(github_url) + "/websoft9/docker-" + name + " repo/docker-"+name
print(cmd)
os.system(cmd)

View file

@ -5,9 +5,6 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, U
import urllib.parse
import urllib.request
# for Git clone HA
github_url = ("https://github.com", "https://github.com.cnpmjs.org", "https://hub.fastgit.org")
class SmoothUrl:
''' get url '''

View file

@ -12,7 +12,11 @@ app = typer.Typer()
def list():
'''print the lists file'''
controller.Print.printRepo()
@app.command()
def gitclone(name: str):
'''git clone'''
controller.Github.gitClone(name)
@app.command()
def update(name: str):