Fix assigning unique numbers to builds
Summary: Just rolling back a part of D24782300 (dce7422ba6) where I've accidently removed using of unique number because did not understood how it is passed and wrongly decided it is not needed.
Reviewed By: passy
Differential Revision: D25027458
fbshipit-source-id: f623732c161bca01859f91444c2a0ed211a5fad6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2c9219f99a
commit
32ca27f4f7
@@ -201,7 +201,12 @@ export function buildFolder(): Promise<string> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
export function getVersionNumber() {
|
export function getVersionNumber() {
|
||||||
const {version} = require('../package.json');
|
let {version} = require('../package.json');
|
||||||
|
// Unique build number is passed as --version parameter from Sandcastle
|
||||||
|
const buildNumber = process.argv.join(' ').match(/--version=(\d+)/);
|
||||||
|
if (buildNumber && buildNumber.length > 0) {
|
||||||
|
version = [...version.split('.').slice(0, 2), buildNumber[1]].join('.');
|
||||||
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user