Updates beta release script to display current beta version (#4605)

This commit is contained in:
alschmiedt
2021-02-18 16:12:32 -08:00
committed by GitHub
parent ea39e03b8c
commit 5da6bb05ba

View File

@@ -126,8 +126,9 @@ function updateBetaVersion(done) {
var newVersion = null;
var blocklyVersions = JSON.parse(execSync('npm view blockly versions --json').toString());
var re = new RegExp(/-beta\.(\d)/);
var latestBetaVersion = execSync('npm show blockly version --tag beta').toString().trim();
while(!isValid) {
newVersion = readlineSync.question('What is the new beta version? (ex: 3.20201217.0-beta.0)');
newVersion = readlineSync.question(`What is the new beta version? (latest beta version: ${latestBetaVersion})`);
var existsOnNpm = blocklyVersions.indexOf(newVersion) > -1;
var isFormatted = newVersion.search(re) > -1;
if (!existsOnNpm && isFormatted) {