iride-setup 0.2.1 - clone con gitea_user della licenza
This commit is contained in:
parent
eaac6c22c2
commit
8617873cc9
|
|
@ -90,7 +90,7 @@ html,body{height:100%;background:var(--bg);color:var(--text);font-family:var(--s
|
|||
<div class="hdr-logo">IRIDE</div>
|
||||
<div class="hdr-sep"></div>
|
||||
<div class="hdr-sub">Setup Wizard — Tecnotel Servizi SRL</div>
|
||||
<div class="hdr-badge">v0.2.0</div>
|
||||
<div class="hdr-badge">v0.2.1</div>
|
||||
</header>
|
||||
<div class="main">
|
||||
<aside class="sidebar">
|
||||
|
|
@ -255,7 +255,7 @@ html,body{height:100%;background:var(--bg);color:var(--text);font-family:var(--s
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">IRIDE — Tecnotel Servizi SRL · Web Installer v0.2.0 · La porta 8888 verrà chiusa al termine</footer>
|
||||
<footer class="footer">IRIDE — Tecnotel Servizi SRL · Web Installer v0.2.1 · La porta 8888 verrà chiusa al termine</footer>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ PRODUCT = "iride"
|
|||
# Stessa costante di iride/backend/core/license.py e del portale Tecnotel.
|
||||
_LICENSE_PUBLIC_KEY_B64 = "GMRsZMoxOlCBiJU66EsQcj0ZO0gVd0GHB5LelEo/hns="
|
||||
|
||||
# ── Clone: username Basic Auth del bot Gitea al quale appartiene il token ─────
|
||||
# ── Clone: username Basic Auth del bot Gitea al quale appartiene il token.
|
||||
# Le licenze IRIDE lo portano nel payload (gitea_user); fallback al bot ARGOS.
|
||||
GITEA_BOT_USER = "argos-portal-bot"
|
||||
GITEA_REPO_PATH = "/tecnotel/iride.git"
|
||||
|
||||
|
|
@ -264,7 +265,8 @@ def install(data):
|
|||
if (APP_DIR / ".git").exists():
|
||||
log("Repository già presente — skip clone")
|
||||
else:
|
||||
auth_url = f"https://{GITEA_BOT_USER}:{gitea_token}@{gitea_host[len('https://'):]}{GITEA_REPO_PATH}"
|
||||
bot_user = lic.get("gitea_user") or GITEA_BOT_USER
|
||||
auth_url = f"https://{bot_user}:{gitea_token}@{gitea_host[len('https://'):]}{GITEA_REPO_PATH}"
|
||||
APP_DIR.parent.mkdir(parents=True, exist_ok=True)
|
||||
run(f"git config --global --add safe.directory {APP_DIR}")
|
||||
run(f"git clone {auth_url} {APP_DIR}")
|
||||
|
|
@ -633,6 +635,7 @@ class SetupHandler(BaseHTTPRequestHandler):
|
|||
"issued_at": lic.get("issued_at", ""),
|
||||
"expires_at": lic.get("expires_at", ""),
|
||||
"product": lic.get("product", "") or "(non indicato)",
|
||||
"gitea_user": lic.get("gitea_user", "") or GITEA_BOT_USER,
|
||||
"has_gitea": bool(lic.get("gitea_token")),
|
||||
}})
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue