Skip to content

Commit

Permalink
Merge pull request #410 from layer5io/407-scripts
Browse files Browse the repository at this point in the history
chore(repo): create scripts to prelease and release
  • Loading branch information
nebula-aac committed Dec 10, 2023
2 parents cd174b7 + cc28431 commit a0a2d98
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,22 @@ package-format-check:

package-format-fix:
yarn run format:write

.PHONY: version-patch version-minor version-major version-alpha

# Create a patch version of packages
version-patch:
yarn run versionup:patch

# Create a minor version of packages
version-minor:
yarn run versionup:minor

# Create a major versio of packages
version-major:
yarn run versionup:major

# Create beta version of the next minor version
# For example: 0.12.0 => 0.13.0-alpha.0
version-alpha:
yarn run version:alpha
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
"format:write": "prettier --write \"**/*.{ts,tsx,md}\" --config ./.prettierrc",
"postinstall": "husky install",
"lint": "eslint .",
"prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\""
"prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\"",
"publish:ci": "lerna publish --from-git --no-private --yes",
"publish:official": "lerna publish --from-package",
"version:alpha": "yarn lerna version --no-private --conventional-commits --conventional-prerelease --include-merged-tags --no-git-tag-version --sync-dist-version",
"versionup:major": "yarn lerna version major --no-private --conventional-commits --include-merged-tags --no-git-tag-version --sync-dist-version",
"versionup:minor": "yarn lerna version minor --no-private --conventional-commits --include-merged-tags --no-git-tag-version --sync-dist-version",
"versionup:patch": "yarn lerna version patch --no-private --conventional-commits --include-merged-tags --no-git-tag-version --sync-dist-version"
},
"husky": {
"hooks": {
Expand Down
3 changes: 2 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"build": "NODE_ENV=production tsup",
"dev": "NODE_ENV=development tsup",
"lint": "eslint .",
"lint:fix": "eslint --fix"
"lint:fix": "eslint --fix",
"prepublish": "yarn build"
},
"dependencies": {
"@layer5/sistent-svg": "^0.14.1"
Expand Down
3 changes: 2 additions & 1 deletion packages/svg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"dev": "NODE_ENV=development tsup",
"coverage": "jest --coverage",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"test": "jest"
"test": "jest",
"prepublish": "yarn build"
},
"devDependencies": {
"@testing-library/react": "^14.0.0",
Expand Down

0 comments on commit a0a2d98

Please sign in to comment.