mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-24 16:40:25 +00:00
gitclone
This commit is contained in:
parent
2c04627f8d
commit
65500eb06e
3 changed files with 21 additions and 6 deletions
|
@ -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)
|
|
@ -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 '''
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue