Skip to content

Commit

Permalink
build(ci): 构建脚本优化
Browse files Browse the repository at this point in the history
  • Loading branch information
phk422 committed Dec 28, 2023
1 parent 2138309 commit e0dd3df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
"publish:ci": "npm publish --access public",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prerelease": "cross-env ARG=prerelease esno scripts/release.ts",
"patch": "cross-env ARG=patch esno scripts/release.ts",
"major": "cross-env ARG=major esno scripts/release.ts"
"prerelease": "cross-env VERSION_ARG=prerelease pnpm release",
"patch": "cross-env VERSION_ARG=patch pnpm release",
"minor": "cross-env VERSION_ARG=minor pnpm release",
"major": "cross-env VERSION_ARG=major pnpm release",
"release": "esno scripts/release.ts"
},
"dependencies": {
"commander": "^11.1.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import process from 'node:process'
import { execSync } from 'node:child_process'

execSync(`bump ${process.env.ARG} --commit "chore: release v" --tag "v" --push`, { stdio: 'inherit' })
execSync(`bump ${process.env.VERSION_ARG} --commit "chore: release v" --tag "v" --push`, { stdio: 'inherit' })

0 comments on commit e0dd3df

Please sign in to comment.