Compare commits
No commits in common. "master" and "dev" have entirely different histories.
18
README.md
18
README.md
@ -4,11 +4,7 @@ Dies erzeugt ein neues GIT Repository auf ein Asustor NAS (Only GIT installed).
|
|||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
V 1.2.2
|
V 1.2.1
|
||||||
|
|
||||||
## TODO
|
|
||||||
- **TODO:** User abfangen wenn Remote nicht erkennt.
|
|
||||||
- **TODO:** History einbauen
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -16,12 +12,7 @@ Dies erzeugt ein neues GIT Repository auf ein Asustor NAS (Only GIT installed).
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### V 1.2.2
|
### V 1.2.1 **(WIP)**
|
||||||
- `main.py`
|
|
||||||
- Added username and mail support
|
|
||||||
|
|
||||||
|
|
||||||
### V 1.2.1
|
|
||||||
- `main.py`
|
- `main.py`
|
||||||
- Added " " zu "_" und Illigale Zeichen abfangen
|
- Added " " zu "_" und Illigale Zeichen abfangen
|
||||||
- Ackknowlege vom User bekommen
|
- Ackknowlege vom User bekommen
|
||||||
@ -29,7 +20,7 @@ Dies erzeugt ein neues GIT Repository auf ein Asustor NAS (Only GIT installed).
|
|||||||
- **TODO:** User abfangen wenn Remote nicht erkennt.
|
- **TODO:** User abfangen wenn Remote nicht erkennt.
|
||||||
- **TODO:** History einbauen
|
- **TODO:** History einbauen
|
||||||
|
|
||||||
### V 1.2
|
### V 1.2 **(WIP)**
|
||||||
- `main.py`
|
- `main.py`
|
||||||
- Added Remote Adresse zu ändern (Local & Public)
|
- Added Remote Adresse zu ändern (Local & Public)
|
||||||
- Added Multiuser
|
- Added Multiuser
|
||||||
@ -42,9 +33,6 @@ Dies erzeugt ein neues GIT Repository auf ein Asustor NAS (Only GIT installed).
|
|||||||
- Start des Projektes
|
- Start des Projektes
|
||||||
- `main.py` angefertigt
|
- `main.py` angefertigt
|
||||||
|
|
||||||
## Wichtige Info
|
|
||||||
- Um zu schauen welchen Upstream branch es gibt, nutze:
|
|
||||||
>git ls-remote --heads origin
|
|
||||||
|
|
||||||
|
|
||||||
## Beitragende
|
## Beitragende
|
||||||
|
|||||||
13
main.py
13
main.py
@ -2,8 +2,7 @@ import subprocess
|
|||||||
import socket
|
import socket
|
||||||
|
|
||||||
username = input("Hallo, wie lautet ihr Username? (Achte bitte auf Groß und Kleinschrift): ")
|
username = input("Hallo, wie lautet ihr Username? (Achte bitte auf Groß und Kleinschrift): ")
|
||||||
hostname = input(f"\nSuper, {username}. Jetzt bräuchte ich noch die Remote-adresse (NAS IP): ")
|
hostname = input(f"\nSuper, {username}. Jetzt bräuchte ich noch die Remote-adresse: ")
|
||||||
localhostname = input(f"\nJetzt bräuchte ich noch die Local-adresse (z.b aus Host datei): ")
|
|
||||||
port= "22"
|
port= "22"
|
||||||
port = input(f"\nStandartport {port} nutzen? (y/j/PORT-Nr) ")
|
port = input(f"\nStandartport {port} nutzen? (y/j/PORT-Nr) ")
|
||||||
if port.lower() in ["ja","j","y"] or not port.isdigit():
|
if port.lower() in ["ja","j","y"] or not port.isdigit():
|
||||||
@ -18,8 +17,6 @@ project_name= project_name.translate(ili_signs_tab)
|
|||||||
ack = input(f"\nOkay > {username} <, bitte prüfe ob der Name so richtig ist: > {project_name} <\nfür den Host > {hostname} < auf dem Port > {port} < (y/n)? ")
|
ack = input(f"\nOkay > {username} <, bitte prüfe ob der Name so richtig ist: > {project_name} <\nfür den Host > {hostname} < auf dem Port > {port} < (y/n)? ")
|
||||||
if ack.lower() == "y" or ack.lower() == "j":
|
if ack.lower() == "y" or ack.lower() == "j":
|
||||||
print("\nSuper, ich lege los!")
|
print("\nSuper, ich lege los!")
|
||||||
name = input("Wie ist dein Name für den Remotehost? ")
|
|
||||||
mail = input("Wie ist deine E-Mail für den Remotehost? ")
|
|
||||||
else:
|
else:
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
@ -37,12 +34,12 @@ commands = [
|
|||||||
"cd ../",
|
"cd ../",
|
||||||
f"cd {project_name}",
|
f"cd {project_name}",
|
||||||
"git init",
|
"git init",
|
||||||
f'git config --global user.email "{mail}"',
|
'git config --global user.email "y-esser@t-online.de"',
|
||||||
f'git config --global user.name "{name}"',
|
'git config --global user.name "Yannick"',
|
||||||
"touch README.txt",
|
"touch README.txt",
|
||||||
"git add .",
|
"git add .",
|
||||||
'git commit -am "INIT"',
|
'git commit -am "INIT"',
|
||||||
f"git remote add origin ssh://{username}@{hostname}:{port}/share/Public/git/{project_name}.git"
|
f"git remote add origin ssh://{username}@{hostname}/share/Public/git/{project_name}.git"
|
||||||
]
|
]
|
||||||
|
|
||||||
# SSH-Verbindung herstellen und Befehle ausführen
|
# SSH-Verbindung herstellen und Befehle ausführen
|
||||||
@ -67,6 +64,6 @@ else:
|
|||||||
print("Hier sind Hilfreiche Befehle:")
|
print("Hier sind Hilfreiche Befehle:")
|
||||||
print(f"\ncd share/Public/git/{project_name}")
|
print(f"\ncd share/Public/git/{project_name}")
|
||||||
print("\ngit push origin master")
|
print("\ngit push origin master")
|
||||||
print(f'\ngit clone "ssh://{username}@{localhostname}:{port}/share/Public/git/{project_name}.git"')
|
print(f'\ngit clone "ssh://yannick@192.168.2.106/share/Public/git/{project_name}.git"')
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Leider ist da was Fehlgeschlagen: {e}")
|
print(f"Leider ist da was Fehlgeschlagen: {e}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user