Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
add prepare script
Browse files Browse the repository at this point in the history
  • Loading branch information
ostowe committed Jun 30, 2021
1 parent 97e79bf commit 267981d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions bin/release-prepare
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');

// Skip commitizen for all commits happening within this script.
process.env.HUSKY_SKIP_HOOKS = 1;

const lernaJson = JSON.parse(
fs.readFileSync(
path.join(__dirname, '../lerna.json'),
'utf8'
)
);

const versionMatches = lernaJson.version.match(/^\d\.\d/);
const releaseBranchName = `release/${versionMatches[0]}`;

execSync(`git checkout ${releaseBranchName}`);
execSync('npm run release:beta');
File renamed without changes.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"release": "HUSKY_SKIP_HOOKS=1 dotenv -- lerna publish --conventional-commits --conventional-graduate --create-release github",
"release:bump": "HUSKY_SKIP_HOOKS=1 lerna publish preminor --conventional-prerelease --preid alpha --dist-tag alpha",
"release:recover": "HUSKY_SKIP_HOOKS=1 lerna publish from-git",
"release:reconcile": "node bin/reconcile-release",
"release:reconcile": "node bin/release-reconcile",
"release:prepare": "node bin/release-prepare",
"//": "nohoist option is used to prevent internal packages from being hoisted/deleted by lerna (which is a bug, I think)",
"develop:bootstrap": "lerna bootstrap --hoist --nohoist=@irvingjs/*",
"develop:cleanup": "lerna exec --stream -- \"rm -rf node_modules\" && rm -rf node_modules",
Expand Down

0 comments on commit 267981d

Please sign in to comment.