From 21bfce4c04f94715b8ad3b4c17fbefb11583c702 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 3 Jul 2026 09:16:32 +0200 Subject: [PATCH] chore: refactor the release script --- scripts/release.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index 97bb6ad..56acb99 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -3,9 +3,10 @@ import { simpleGit } from 'simple-git' const git = simpleGit() const hash = await git.revparse(['main']) +const remote = 'gh' console.log('Fetch remote gh repo') -await git.fetch('gh') +await git.fetch(remote) console.log('Checkout release branch') await git.checkout(['-b', 'release', '--track', 'gh/release']) @@ -14,7 +15,7 @@ console.log(`Reset to main branch (${hash})`) await git.reset(['--hard', hash]) console.log('Push to release branch') -await git.push(['--force', 'gh']) +await git.push(['--force', remote]) console.log('Checkout main branch') await git.checkout('main') @@ -25,5 +26,5 @@ await git.branch(['-D', 'release']) // TODO: handle multiple remotes with a data structure console.log('Push tags') await git.push(['--tags']) -await git.push(['--tags', 'gh']) +await git.push(['--tags', remote]) await git.push(['--tags', 'sh']) \ No newline at end of file