docs: note published Gitea repository; fix push helper for missing origin
This commit is contained in:
1 parent
50cda6f5c1
commit
1de986c05d
2 files changed
+5
-1
No files matched your search
@@ -71,7 +71,8 @@ const main = async () => {
|
||||
const scheme = base.split('://')[0];
|
||||
const host = base.split('://')[1];
|
||||
const authUrl = `${scheme}://${encodeURIComponent(login)}:${encodeURIComponent(token)}@${host}/${login}/${repo}.git`;
|
||||
git(['remote', 'remove', 'origin']);
|
||||
const remotes = spawnSync('git', ['remote'], { encoding: 'utf8' }).stdout || '';
|
||||
if (/\borigin\b/.test(remotes)) git(['remote', 'remove', 'origin']);
|
||||
git(['remote', 'add', 'origin', authUrl]);
|
||||
try {
|
||||
const pushed = git(['push', '-u', 'origin', 'HEAD:main']);
|
||||
|
||||
Reference in new issue
Block a user