Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(repo): create scripts to prelease and release #410

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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