fix(update): fetch rilis dari Gitea, bukan github.com
This commit is contained in:
1 parent
19558b9b94
commit
11ccc31933
1 file changed
+2
-2
@@ -396,7 +396,7 @@ function getUpdateInfo(repoRoot) {
|
|||||||
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
||||||
info.repo = _repo || 'origin';
|
info.repo = _repo || 'origin';
|
||||||
const fetch = _repo
|
const fetch = _repo
|
||||||
? runCmd('git', ['fetch', '--prune', 'https://github.com/' + _repo + '.git', branch], repoRoot)
|
? runCmd('git', ['fetch', '--prune', 'https://gitea.oxpoe.qzz.io/' + _repo + '.git', branch], repoRoot)
|
||||||
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
||||||
if (!fetch.ok) {
|
if (!fetch.ok) {
|
||||||
info.error = 'Gagal git fetch: ' + (fetch.stderr || fetch.stdout || '').trim();
|
info.error = 'Gagal git fetch: ' + (fetch.stderr || fetch.stdout || '').trim();
|
||||||
@@ -4634,7 +4634,7 @@ router.post('/update/run', requireAdminSession, restrictToAdmin, (req, res) => {
|
|||||||
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
||||||
info.repo = _repo || 'origin';
|
info.repo = _repo || 'origin';
|
||||||
const fetch = _repo
|
const fetch = _repo
|
||||||
? runCmd('git', ['fetch', '--prune', 'https://github.com/' + _repo + '.git', branch], repoRoot)
|
? runCmd('git', ['fetch', '--prune', 'https://gitea.oxpoe.qzz.io/' + _repo + '.git', branch], repoRoot)
|
||||||
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
||||||
pushCmd('git fetch --prune', fetch);
|
pushCmd('git fetch --prune', fetch);
|
||||||
if (!fetch.ok) throw new Error('Gagal git fetch.');
|
if (!fetch.ok) throw new Error('Gagal git fetch.');
|
||||||
|
|||||||
Reference in new issue
Block a user