clear-wallet@v1.4.11

This commit is contained in:
Andrei O 2025-01-23 10:15:34 +02:00
parent b267da1f7c
commit d2671eff1c
No known key found for this signature in database
GPG Key ID: B961E5B68389457E
2 changed files with 12 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "clear-wallet",
"version": "1.4.10",
"version": "1.4.11",
"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.",
"type": "module",

View File

@ -5,25 +5,29 @@ import { resolve } from 'path';
async function main() {
// 0. Check tag is not already created
const tags = execSync(`git tag --list`).toString();
if (tags.includes(`v${process.env.npm_package_version}`)) {
console.log(`Tag v${process.env.npm_package_version} already exists`);
if(!process.env.npm_package_version) {
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;
}
// 1. Bump version in package.json
const packageJsonPath = resolve('./package.json');
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
const currentVersion = packageJson.version;
const newVersion = bumpVersion(currentVersion);
packageJson.version = newVersion;
packageJson.version = nextVersion;
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
// 3. Commit changes
execSync(`git add .`);
execSync(`git commit -m "clear-wallet@v${newVersion}"`);
execSync(`git commit -m "clear-wallet@v${nextVersion}"`);
// 4. Create and push tag
execSync(`git tag v${newVersion}`);
execSync(`git tag v${nextVersion}`);
execSync(`git push --follow-tags`);
}