From d86f6a1fbd5d2d84a4715171b3cb42d0b47702a4 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 22 Sep 2020 16:36:46 +0100 Subject: [PATCH] Tools: Require setting type flag for new Android releases --- Tools/release-android.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/release-android.js b/Tools/release-android.js index ccecc195c..f2e79807b 100644 --- a/Tools/release-android.js +++ b/Tools/release-android.js @@ -151,7 +151,9 @@ async function createRelease(name, tagName, version) { async function main() { const argv = require('yargs').argv; - const isPreRelease = !!argv.prerelease; + if (!['release', 'prerelease'].includes(argv.type)) throw new Error('Must specify release type. Either --type=release or --type=prerelease'); + + const isPreRelease = argv.type === 'prerelease'; if (isPreRelease) console.info('Creating pre-release'); console.info('Updating version numbers in build.gradle...');