mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
gitclone
This commit is contained in:
parent
2c04627f8d
commit
65500eb06e
3 changed files with 21 additions and 6 deletions
|
@ -1,8 +1,11 @@
|
|||
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):
|
||||
|
@ -10,3 +13,14 @@ class Print:
|
|||
|
||||
def printRepo():
|
||||
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 '''
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@ 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