Support for alpha build channel
This commit is contained in:
parent
c0ab1dff11
commit
7ce89414bf
15 changed files with 337 additions and 27 deletions
33
scripts/prepare_alpha_version.js
Normal file
33
scripts/prepare_alpha_version.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const fs = require('fs');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const _ = require('lodash');
|
||||
|
||||
const { generateAlphaVersion } = require('../ts/util/version');
|
||||
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
const { version: currentVersion } = packageJson;
|
||||
|
||||
const shortSha = execSync('git rev-parse --short HEAD')
|
||||
.toString('utf8')
|
||||
.replace(/[\n\r]/g, '');
|
||||
|
||||
const alphaVersion = generateAlphaVersion({ currentVersion, shortSha });
|
||||
|
||||
console.log(
|
||||
`prepare_alpha_version: updating package.json.\n Previous: ${currentVersion}\n New: ${alphaVersion}`
|
||||
);
|
||||
|
||||
// -------
|
||||
|
||||
_.set(packageJson, 'version', alphaVersion);
|
||||
|
||||
// -------
|
||||
|
||||
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, ' '));
|
Loading…
Add table
Add a link
Reference in a new issue