feat(scripts): ✨ Use git's credential store instead of prompting for username and password.

This commit is contained in:
2025-03-18 13:30:41 -03:00
parent 41b8bb8825
commit c32585f738
+4 -7
View File
@@ -1,6 +1,6 @@
import os
import sys
import time
import getpass
try:
import toml
@@ -20,12 +20,9 @@ except ImportError:
)
sys.exit()
username = input("Username for git.nyeki.dev: ")
password = getpass.getpass("Password for git.nyeki.dev: ")
os.system("git pull")
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
data = toml.load(open("pyproject.toml"))
data = toml.load(open("pyproject.toml", encoding="utf-8"))
version = data["project"]["version"].split(".")
latest_tag = "v" + version[1]
@@ -43,7 +40,7 @@ print("Waiting 15 seconds to run migrations...")
time.sleep(15)
with open("./k8s/bot.yml") as stream:
with open("./k8s/bot.yml", encoding="utf-8") as stream:
try:
docs = list(yaml.load_all(stream, yaml.Loader))
data = docs[0]