릴리즈 v0.2.9: Gitea 자동완성 방지 및 태그 강제 동기화 로직 추가

This commit is contained in:
choibk 2026-01-24 20:46:46 +09:00
parent eef9c12d77
commit 3c657d90e9
4 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "smartims", "name": "smartims",
"private": true, "private": true,
"version": "0.2.8", "version": "0.2.9",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -1,6 +1,6 @@
{ {
"name": "server", "name": "server",
"version": "0.2.8", "version": "0.2.9",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -471,14 +471,14 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res
// Prepare git fetch command with auth if available // Prepare git fetch command with auth if available
const auth = await getGiteaAuth(); const auth = await getGiteaAuth();
let fetchCmd = 'git fetch --tags'; let fetchCmd = 'git fetch --tags --force';
if (auth.user && auth.pass) { if (auth.user && auth.pass) {
// Inject auth into URL // Inject auth into URL
const authenticatedUrl = auth.url.replace('https://', `https://${encodeURIComponent(auth.user)}:${encodeURIComponent(auth.pass)}@`); const authenticatedUrl = auth.url.replace('https://', `https://${encodeURIComponent(auth.user)}:${encodeURIComponent(auth.pass)}@`);
fetchCmd = `git fetch ${authenticatedUrl} --tags`; fetchCmd = `git fetch ${authenticatedUrl} --tags --force`;
} else { } else {
fetchCmd = `git fetch ${auth.url} --tags`; fetchCmd = `git fetch ${auth.url} --tags --force`;
} }
exec(fetchCmd, (err, stdout, stderr) => { exec(fetchCmd, (err, stdout, stderr) => {

View File

@ -386,6 +386,8 @@ export function BasicSettingsPage() {
<div className="space-y-1"> <div className="space-y-1">
<label className="text-sm font-medium text-slate-700">Gitea ID</label> <label className="text-sm font-medium text-slate-700">Gitea ID</label>
<Input <Input
name="gitea_username_config"
autoComplete="off"
value={settings.gitea_user} value={settings.gitea_user}
onChange={e => setSettings({ ...settings, gitea_user: e.target.value })} onChange={e => setSettings({ ...settings, gitea_user: e.target.value })}
placeholder="gitea_update_user" placeholder="gitea_update_user"
@ -395,6 +397,8 @@ export function BasicSettingsPage() {
<label className="text-sm font-medium text-slate-700">Gitea ( Token)</label> <label className="text-sm font-medium text-slate-700">Gitea ( Token)</label>
<Input <Input
type="password" type="password"
name="gitea_password_config"
autoComplete="new-password"
value={settings.gitea_password} value={settings.gitea_password}
onChange={e => setSettings({ ...settings, gitea_password: e.target.value })} onChange={e => setSettings({ ...settings, gitea_password: e.target.value })}
placeholder="••••••••" placeholder="••••••••"