|
17 | 17 | init()
|
18 | 18 | config_obj = ConfigParser()
|
19 | 19 |
|
| 20 | +# TODO : check remote repository if exist |
| 21 | +# TODO : add new command 'remote' to create (empty)-remote repository only |
| 22 | +# TODO : add configuration so user that contains |
| 23 | +# customization or default value by user,e.g : change styles,set defaul value etc |
20 | 24 | # TODO : add ssh
|
21 |
| -# TODO : user can custom remote name |
22 | 25 |
|
23 | 26 | @click.group()
|
24 |
| -@click.version_option("0.2.0", help="Show version") |
| 27 | +@click.version_option("0.2.1", help="Show version") |
25 | 28 | def pyginit():
|
26 | 29 | """pyGinit a simple cli automation tools
|
27 | 30 | to initalize both local and remote repository
|
28 | 31 |
|
29 |
| - version : 0.2.1-beta |
| 32 | + version : 0.2.1 |
30 | 33 | """
|
31 | 34 | pass
|
32 | 35 |
|
@@ -69,7 +72,7 @@ def add_gitignore(gitginore_template):
|
69 | 72 | click.echo(
|
70 | 73 | Fore.RED
|
71 | 74 | + Style.BRIGHT
|
72 |
| - + "Error:Connection error when downloading .gitginore template" |
| 75 | + + "Error:Connection error when downloading gitginore template" |
73 | 76 | )
|
74 | 77 | exit()
|
75 | 78 |
|
@@ -111,7 +114,6 @@ def init():
|
111 | 114 | if exception happen(connection error,wrong inpu etc) repository(local and remote)
|
112 | 115 | is not created
|
113 | 116 | """
|
114 |
| - |
115 | 117 | # add readme
|
116 | 118 | add_readme(
|
117 | 119 | answers.get("readme_confirm"),
|
@@ -180,6 +182,10 @@ def init():
|
180 | 182 | else:
|
181 | 183 | click.echo("creating repository...Please wait")
|
182 | 184 | click.echo("pushing file to remote")
|
| 185 | + |
| 186 | + # initialize local git and push it to remote |
| 187 | + # if user cancel the pushing process, |
| 188 | + # only remote repository are created(empty repo) |
183 | 189 | execute_git(
|
184 | 190 | config_obj["auth"]["username"],
|
185 | 191 | config_obj["auth"]["token"],
|
|
0 commit comments