feat(scripts): ✨ Use git's credential store instead of prompting for username and password.
This commit is contained in:
+4
-7
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import getpass
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import toml
|
import toml
|
||||||
@@ -20,12 +20,9 @@ except ImportError:
|
|||||||
)
|
)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
username = input("Username for git.nyeki.dev: ")
|
os.system("git pull")
|
||||||
password = getpass.getpass("Password for git.nyeki.dev: ")
|
|
||||||
|
|
||||||
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
|
data = toml.load(open("pyproject.toml", encoding="utf-8"))
|
||||||
|
|
||||||
data = toml.load(open("pyproject.toml"))
|
|
||||||
version = data["project"]["version"].split(".")
|
version = data["project"]["version"].split(".")
|
||||||
latest_tag = "v" + version[1]
|
latest_tag = "v" + version[1]
|
||||||
|
|
||||||
@@ -43,7 +40,7 @@ print("Waiting 15 seconds to run migrations...")
|
|||||||
|
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
|
|
||||||
with open("./k8s/bot.yml") as stream:
|
with open("./k8s/bot.yml", encoding="utf-8") as stream:
|
||||||
try:
|
try:
|
||||||
docs = list(yaml.load_all(stream, yaml.Loader))
|
docs = list(yaml.load_all(stream, yaml.Loader))
|
||||||
data = docs[0]
|
data = docs[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user