mirror of
https://github.com/andrei0x309/clear-wallet.git
synced 2025-02-02 14:50:44 +00:00
clear-wallet@v1.4.11
This commit is contained in:
parent
b267da1f7c
commit
d2671eff1c
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clear-wallet",
|
"name": "clear-wallet",
|
||||||
"version": "1.4.10",
|
"version": "1.4.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Clear Wallet (CLW) is a wallet that helps you manage your Ethereum assets and interact with Ethereum dApps and contracts with the main focus on absolute privacy.",
|
"description": "Clear Wallet (CLW) is a wallet that helps you manage your Ethereum assets and interact with Ethereum dApps and contracts with the main focus on absolute privacy.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -5,25 +5,29 @@ import { resolve } from 'path';
|
|||||||
async function main() {
|
async function main() {
|
||||||
// 0. Check tag is not already created
|
// 0. Check tag is not already created
|
||||||
const tags = execSync(`git tag --list`).toString();
|
const tags = execSync(`git tag --list`).toString();
|
||||||
if (tags.includes(`v${process.env.npm_package_version}`)) {
|
if(!process.env.npm_package_version) {
|
||||||
console.log(`Tag v${process.env.npm_package_version} already exists`);
|
console.log('No version found in package.json');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nextVersion = bumpVersion(process.env.npm_package_version);
|
||||||
|
if (tags.includes(`v${nextVersion}`)) {
|
||||||
|
console.log(`Tag v${nextVersion} already exists`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Bump version in package.json
|
// 1. Bump version in package.json
|
||||||
const packageJsonPath = resolve('./package.json');
|
const packageJsonPath = resolve('./package.json');
|
||||||
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
||||||
const currentVersion = packageJson.version;
|
packageJson.version = nextVersion;
|
||||||
const newVersion = bumpVersion(currentVersion);
|
|
||||||
packageJson.version = newVersion;
|
|
||||||
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||||
|
|
||||||
// 3. Commit changes
|
// 3. Commit changes
|
||||||
execSync(`git add .`);
|
execSync(`git add .`);
|
||||||
execSync(`git commit -m "clear-wallet@v${newVersion}"`);
|
execSync(`git commit -m "clear-wallet@v${nextVersion}"`);
|
||||||
|
|
||||||
// 4. Create and push tag
|
// 4. Create and push tag
|
||||||
execSync(`git tag v${newVersion}`);
|
execSync(`git tag v${nextVersion}`);
|
||||||
execSync(`git push --follow-tags`);
|
execSync(`git push --follow-tags`);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user