]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
build: minor release script changes
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 11 Jun 2024 10:18:00 +0000 (12:18 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 11 Jun 2024 10:18:00 +0000 (12:18 +0200)
scripts/release.mjs

index 7140879fe1d88fdfdf630f26654da8f910a1f06f..bc3ca7c38a770d56f2710cece5a90e21e4465335 100644 (file)
@@ -258,8 +258,13 @@ async function main() {
   step('\nCreating tags...')
   let versionsToPush = []
   for (const pkg of pkgWithVersions) {
-    versionsToPush.push(`refs/tags/${pkg.name}@${pkg.version}`)
-    await runIfNotDry('git', ['tag', `${pkg.name}@${pkg.version}`])
+    const tagName =
+      pkg.name === 'vue-router'
+        ? `v${pkg.version}`
+        : `${pkg.name}@${pkg.version}`
+
+    versionsToPush.push(`refs/tags/${tagName}`)
+    await runIfNotDry('git', ['tag', `${tagName}`])
   }
 
   if (!noPublish) {
@@ -332,7 +337,7 @@ async function publishPackage(pkg) {
         'public',
         // specific to pinia
         '--publish-branch',
-        'v2',
+        EXPECTED_BRANCH,
       ],
       {
         cwd: pkg.path,