Something went wrong. Try again.
Your thinking partner.
Something went wrong. Try again.
123456789101112/** Shared by Expo's Node config loader and Bun's release tooling. */function releaseVersion(tag) { const match = /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(tag); if (!match) throw new Error("Release tags must use vMAJOR.MINOR.PATCH (for example v0.1.1)."); const [major, minor, patch] = match.slice(1).map(Number); const versionCode = major * 1_000_000 + minor * 1_000 + patch; if (minor > 999 || patch > 999 || !Number.isSafeInteger(versionCode) || versionCode < 2 || versionCode > 2_100_000_000) throw new Error("Release version is outside the supported Android version-code range."); return { version: `${major}.${minor}.${patch}`, versionCode };}module.exports = { releaseVersion };