Prechádzať zdrojové kódy

main package should be tagged as well

Raanan Weber 7 rokov pred
rodič
commit
f7ee4ce4bf
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      Tools/Publisher/index.js

+ 6 - 1
Tools/Publisher/index.js

@@ -84,8 +84,13 @@ function processPackages(version) {
             if (packageJson.peerDependencies) packageJson.peerDependencies.babylonjs = minimumDependency;
             fs.writeFileSync(package.path + 'package.json', JSON.stringify(packageJson, null, 4));
             console.log('Publishing ' + package.name + " from " + package.path);
+            let tagDef = "";
+            // check for alpha or beta
+            if (version.indexOf('alpha') !== -1 || version.indexOf('beta') !== -1) {
+                tagDef = '--tag preview';
+            }
             //publish the respected package
-            shelljs.exec('npm publish \"' + package.path + "\"");
+            shelljs.exec('npm publish \"' + package.path + "\"" + ' ' + tagDef);
         }
 
     });