Skip to content

Commit

Permalink
release 6.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Mar 1, 2024
1 parent 4a09793 commit 1518347
Show file tree
Hide file tree
Showing 12 changed files with 902 additions and 854 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 更新日志

## 2024.03.01 v6.3.0

1. `admin` `combine` 指令增加构建提示
2. 升级依赖包

## 2024.02.02 v6.2.0

1. `build`指令增加`--confirm`参数,为 true 时不显示确认框
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/monorepo",
"description": "这是一个git工作流工具",
"version": "6.2.0",
"version": "6.3.0",
"packageManager": "[email protected]",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -47,55 +47,55 @@
"chalk": "^4.1.2",
"debug": "^4.3.4",
"inquirer": "^8.2.5",
"js-cool": "^5.15.2",
"js-cool": "^5.17.1",
"morgan": "^1.10.0",
"os-lang": "^3.2.0"
},
"devDependencies": {
"@esbuild-kit/cjs-loader": "^2.4.4",
"@esbuild-kit/esm-loader": "^2.6.5",
"@eslint-sets/eslint-config-ts": "^5.11.0",
"@microsoft/api-extractor": "^7.39.1",
"@eslint-sets/eslint-config-ts": "^5.12.0",
"@microsoft/api-extractor": "^7.42.1",
"@pnpm/logger": "^5.0.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/gulp": "^4.0.17",
"@types/inquirer": "^8.2.6",
"@types/node": "^20.10.7",
"@types/node": "^20.11.24",
"@types/rollup-plugin-css-only": "^3.1.3",
"@vitejs/plugin-vue": "^5.0.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"consola": "^3.2.3",
"cross-env": "^7.0.3",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"fast-glob": "^3.3.2",
"gulp": "^4.0.2",
"gulp-typescript": "6.0.0-alpha.1",
"load-yml": "^1.4.0",
"madge": "^6.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"prettier-config-common": "^1.4.0",
"reinstaller": "^3.0.2",
"rimraf": "^5.0.5",
"rm-all": "^1.1.1",
"rollup": "^4.9.4",
"rollup": "^4.12.0",
"rollup-plugin-add-banner": "^1.1.0",
"rollup-plugin-css-only": "^4.5.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-node-externals": "^6.1.2",
"rollup-plugin-node-externals": "^7.0.1",
"rollup-plugin-replace-shebang": "^1.2.0",
"rollup-plugin-visualizer": "^5.12.0",
"tsnd": "^1.1.0",
"typedoc": "^0.25.6",
"typedoc": "^0.25.9",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.3.3",
"unplugin-vue-define-options": "^1.4.1",
"unplugin-vue-define-options": "^1.4.2",
"zx": "^7.2.3"
},
"peerDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/core",
"description": "gitmars核心程序",
"version": "6.2.0",
"version": "6.3.0",
"private": false,
"main": "./lib/index.js",
"module": "./lib/index.mjs",
Expand Down Expand Up @@ -59,7 +59,7 @@
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"inquirer": "^8.2.5",
"js-cool": "^5.15.2",
"js-cool": "^5.17.1",
"lodash-es": "^4.17.21",
"lodash-unified": "^1.0.3",
"node-apollo": "^1.2.1",
Expand All @@ -70,17 +70,17 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@eslint-sets/eslint-config-ts": "^5.11.0",
"@eslint-sets/eslint-config-ts": "^5.12.0",
"@types/cross-spawn": "^6.0.6",
"@types/debug": "^4.1.12",
"@types/inquirer": "^8.2.6",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.7",
"@types/node": "^20.11.24",
"@types/shelljs": "^0.8.15",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"madge": "^6.1.0",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"prettier-config-common": "^1.4.0",
"tsnd": "^1.1.0",
"typescript": "^5.3.3"
Expand Down
5 changes: 5 additions & 0 deletions packages/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 更新日志

## 2024.03.01 v6.3.0

1. `admin` `combine` 指令增加构建提示
2. 升级依赖包

## 2024.02.02 v6.2.0

1. `build`指令增加`--confirm`参数,为 true 时不显示确认框
Expand Down
14 changes: 7 additions & 7 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/docs",
"description": "gitmars文档库",
"version": "6.2.0",
"version": "6.3.0",
"private": false,
"files": [
"dist",
Expand All @@ -24,21 +24,21 @@
"typings": "typings"
},
"dependencies": {
"js-cool": "^5.15.2"
"js-cool": "^5.17.1"
},
"devDependencies": {
"@eslint-sets/eslint-config-vue3": "^5.11.0",
"@eslint-sets/eslint-config-vue3": "^5.12.0",
"@types/markdown-it": "^13.0.7",
"@types/node": "^20.10.7",
"eslint": "^8.56.0",
"@types/node": "^20.11.24",
"eslint": "^8.57.0",
"markdown-it": "^14.0.0",
"markdown-it-anchor": "^8.6.7",
"markdown-it-container": "^4.0.0",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"prettier-config-common": "^1.4.0",
"tsnd": "^1.1.0",
"typescript": "^5.3.3",
"vitepress": "1.0.0-rc.35"
"vitepress": "1.0.0-rc.44"
},
"sideEffects": false,
"keywords": [
Expand Down
12 changes: 6 additions & 6 deletions packages/gitmars/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gitmars",
"description": "这是一个git工作流工具",
"version": "6.2.0",
"version": "6.3.0",
"private": false,
"bin": {
"gitm": "lib/gitm.mjs"
Expand Down Expand Up @@ -64,7 +64,7 @@
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"inquirer": "^8.2.5",
"js-cool": "^5.15.2",
"js-cool": "^5.17.1",
"lodash-es": "^4.17.21",
"lodash-unified": "^1.0.3",
"node-apollo": "^1.2.1",
Expand All @@ -74,16 +74,16 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@eslint-sets/eslint-config-ts": "^5.11.0",
"@eslint-sets/eslint-config-ts": "^5.12.0",
"@types/columnify": "^1.5.4",
"@types/cross-spawn": "^6.0.6",
"@types/inquirer": "^8.2.6",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.7",
"@types/node": "^20.11.24",
"@types/shelljs": "^0.8.15",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"prettier": "^3.1.1",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"prettier-config-common": "^1.4.0",
"tsnd": "^1.1.0",
"typescript": "^5.3.3"
Expand Down
68 changes: 49 additions & 19 deletions packages/gitmars/src/gitm-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import adminConfig from '#lib/conf/admin'

const { t } = lang
const require = createRequire(import.meta.url)
const { green, red } = chalk
const { green, red, yellow } = chalk

if (!getIsGitProject()) {
echo(red(t('The current directory is not a git project directory')))
Expand Down Expand Up @@ -676,10 +676,43 @@ publishProgram.action(
]
)
}
if (opt.build && (!level || level < 4)) {
if (opt.build) {
if (!level || level < 4) {
cmd[type] = cmd[type].concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
}
}
])
} else {
echo(
yellow(
t(
'This process will not automatically execute the build process, please wait for the administrator to review the code and execute it: gitm build {appName} -e prod -a {app} {data}',
{
appName,
app: opt.build === true ? 'all' : opt.build,
data: opt.data ? ' --data ' + opt.data : ''
}
)
)
)
}
}
}
// release release branch
if (type === 'release' && opt.build) {
if (!level || level < 4) {
cmd[type] = cmd[type].concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
cmd: `gitm build ${appName} --confirm --env prod --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
Expand All @@ -690,24 +723,21 @@ publishProgram.action(
}
}
])
} else {
echo(
yellow(
t(
'This process will not automatically execute the build process, please wait for the administrator to review the code and execute it: gitm build {appName} -e prod -a {app} {data}',
{
appName,
app: opt.build === true ? 'all' : opt.build,
data: opt.data ? ' --data ' + opt.data : ''
}
)
)
)
}
}
// release release branch
if (type === 'release' && opt.build && (!level || level < 4)) {
cmd[type] = cmd[type].concat([
{
cmd: `gitm build ${appName} --confirm --env prod --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
}
}
])
}
// Release the release branch and sync the release code to the bug line
if (type === 'release' && opt.combine) {
// Is it necessary to merge to the bug
Expand Down
75 changes: 45 additions & 30 deletions packages/gitmars/src/gitm-combine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ program.action(async (type: string, name: string, opt: GitmBuildOption): Promise
sh.echo(
yellow(
t(
'This branch has not been synced for more than 1 week, please sync it at least once a week, execute: gitm update'
'This branch has not been synced for more than 1 week, please sync it at least once a week, execute: gitm update (-f)'
)
)
)
Expand Down Expand Up @@ -587,37 +587,52 @@ program.action(async (type: string, name: string, opt: GitmBuildOption): Promise
}
}
// 仅支持构建bug
if (opt.build && (!level || level < 3)) {
if (type === 'bugfix') {
cmd = cmd.concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
if (opt.build) {
if (!level || level < 3) {
if (type === 'bugfix') {
cmd = cmd.concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
}
}
}
])
}
// support分支要构建bug和release
if (type === 'support' && opt.noBugfix) {
cmd = cmd.concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
])
}
// support分支要构建bug和release
if (type === 'support' && opt.noBugfix) {
cmd = cmd.concat([
{
cmd: `gitm build ${appName} --confirm --env bug --app ${
opt.build === true ? 'all' : opt.build
} ${opt.data ? ' --data ' + opt.data : ''}`,
config: {
stdio: 'inherit',
again: false,
success: t('Pulling up the build was successful'),
fail: t('Failed to pull up the build')
}
}
}
])
])
}
} else {
sh.echo(
yellow(
t(
'This process will not automatically execute the build process, please wait for the administrator to review the code and execute it: gitm build {appName} -e prod -a {app} {data}',
{
appName,
app: opt.build === true ? 'all' : opt.build,
data: opt.data ? ' --data ' + opt.data : ''
}
)
)
)
}
}
}
Expand Down
Loading

0 comments on commit 1518347

Please sign in to comment.