1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/development/lib/get-version.js
Danica Shen f5e2183a7f
feat(17494): beta build trigger in release branch and cleanup (#17749)
* feat(17494): test separate commit triggered build

* feat(17493): keep consistent commit message

* feat(17493): use trim to get rid of white space in branch name

* feat(17493): bring back some pipelines

* Version v10.25.0-beta.0

* ERC1155 Import & Dapp interaction E2E tests (#17885)

* feat(17494): test separate commit triggered build

* feat(17493): remove testing beta commit in package.json

---------

Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
2023-03-04 12:51:04 +00:00

22 lines
790 B
JavaScript

const { version: manifestVersion } = require('../../package.json');
const { BuildType } = require('./build-type');
/**
* Get the current version of the MetaMask extension. The base manifest version
* is modified according to the build type and version.
*
* The build version is needed because certain build types (such as beta) may
* be released multiple times during the release process.
*
* @param {BuildType} buildType - The build type.
* @param {number} buildVersion - The build version.
* @returns {string} The MetaMask extension version.
*/
function getVersion(buildType, buildVersion) {
return buildType === BuildType.main || buildType === BuildType.beta
? manifestVersion
: `${manifestVersion}-${buildType}.${buildVersion}`;
}
module.exports = { getVersion };