Skip to content

Commit

Permalink
release 7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Aug 8, 2024
1 parent fd9bbc2 commit 93ddcbf
Show file tree
Hide file tree
Showing 17 changed files with 288 additions and 182 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

## 2024.08.08 v7.4.0

1. `build-mp` 增加生成版本类型的选择环节,增加输入baseInfo

## 2024.08.02 v7.3.0

1. 修复 `miniprogramToken` `miniprogramSession` 参数必填问题
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@gitmars/monorepo",
"description": "这是一个git工作流工具",
"version": "7.3.0",
"packageManager": "pnpm@9.1.0",
"version": "7.4.0",
"packageManager": "pnpm@9.7.0",
"main": "index.js",
"files": [
"static",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/api",
"description": "gitmars api",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/build",
"description": "gitmars build",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/cache",
"description": "gitmars cache",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/core",
"description": "gitmars核心程序",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
1 change: 1 addition & 0 deletions packages/docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ gitm build
#### 短指令:gitm bdm

> v7.0.0 版本新增
> v7.4.0 增加生成版本类型的选择环节,增加输入baseInfo
该指令用于发起 Jenkins 构建小程序

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

## 2024.08.08 v7.4.0

1. `build-mp` 增加生成版本类型的选择环节,增加输入baseInfo

## 2024.08.02 v7.3.0

1. 修复 `miniprogramToken` `miniprogramSession` 参数必填问题
Expand Down
4 changes: 2 additions & 2 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": "7.3.0",
"version": "7.4.0",
"private": false,
"files": [
"dist",
Expand Down Expand Up @@ -37,7 +37,7 @@
"prettier-config-common": "^1.4.0",
"tsnd": "^1.1.0",
"typescript": "^5.4.5",
"vitepress": "1.2.0"
"vitepress": "1.3.2"
},
"sideEffects": false,
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/git/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/git",
"description": "gitmars git",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/gitmars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gitmars",
"description": "这是一个git工作流工具",
"type": "module",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"bin": {
"gitm": "lib/gitm.mjs"
Expand Down
54 changes: 52 additions & 2 deletions packages/gitmars/src/gitm-build-mp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ program.action(async (project: string, opt: GitmBuildMpOption): Promise<void> =>
_confirm = opt.confirm,
build_api_env = opt.build_api_env || data.build_api_env,
mini_program = opt.miniprogram || data.mini_program,
description = opt.description || data.description
description = opt.description || data.description,
versionType = data.versionType,
baseInfo = data.baseInfo

if (!project) {
if (getIsGitProject()) project = getGitConfig().appName
Expand Down Expand Up @@ -162,6 +164,35 @@ program.action(async (project: string, opt: GitmBuildMpOption): Promise<void> =>
)
}
}
if (!versionType) {
;[, versionType] = await to(
select({
message: t('Select the type of version to be generated'),
choices: [
{
name: 'none',
value: 'none',
description: t('Do not generate new versions')
},
{
name: 'patch',
value: 'patch',
description: t('Patch version(bug fixes, minor changes)')
},
{
name: 'minor',
value: 'minor',
description: t('Minor version(New Features)')
},
{
name: 'major',
value: 'major',
description: t('Major version(Framework reorganization, major revamp)')
}
]
})
)
}
if (!description) {
;[, description] = await to(
input({
Expand All @@ -170,6 +201,16 @@ program.action(async (project: string, opt: GitmBuildMpOption): Promise<void> =>
}).then(val => val.trim())
)
}
if (!baseInfo) {
;[, baseInfo] = await to(
input({
message: t(
"Enter the baseInfo to be extended, Leave it blank if you don't need it."
),
transformer: val => val.trim()
}).then(val => val.trim())
)
}

if (!_confirm) {
let message = `${yellow(t('Please double check the following build parameters'))}\n${t(
Expand All @@ -181,7 +222,9 @@ program.action(async (project: string, opt: GitmBuildMpOption): Promise<void> =>
message += `\n${t('Interface Environment')}: ${red(build_api_env || 'production')}`
if (mini_program)
message += `\n${t('Experience version pushed to')}: ${red(mini_program || t('Push to templates only'))}`
if (versionType) message += `\n${t('Type of version to generate')}: ${red(versionType)}`
if (description) message += `\n${t('Version Description')}: ${red(description)}`
if (baseInfo) message += `\n${t('BaseInfo to be extended')}: ${red(baseInfo)}`
if ('clean' in data)
message += `\n${t('Clean node modules (use with caution)')}: ${red(data.clean)}`
;[, _confirm] = await to(confirm({ message }))
Expand All @@ -193,7 +236,14 @@ program.action(async (project: string, opt: GitmBuildMpOption): Promise<void> =>
env: env!,
project,
app: app!,
data: JSON.stringify({ ...data, build_api_env, mini_program, description })
data: JSON.stringify({
...data,
build_api_env,
mini_program,
versionType,
description,
baseInfo
})
})
})
program.parse(process.argv)
Expand Down
11 changes: 10 additions & 1 deletion packages/gitmars/src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,14 @@ export default {
'Implementation success': '执行成功',
'Select wechat account': '选择微信账号',
'Confirm unbind wechat account': '是否确认解绑体验者',
'Push target branch': '推送目标分支到远程'
'Push target branch': '推送目标分支到远程',
'Select the type of version to be generated': '选择要生成的版本号类型',
'Type of version to generate': '生成版本类型',
'Do not generate new versions': '不生成新版本',
'Patch version(bug fixes, minor changes)': '补丁版本(bug修复,小改动)',
'Minor version(New Features)': '小版本(新特性)',
'Major version(Framework reorganization, major revamp)': '大版本(框架重构或大改版)',
"Enter the baseInfo to be extended, Leave it blank if you don't need it.":
'填写要扩展的baseInfo内容,如果不需要则留空',
'BaseInfo to be extended': '扩展数据'
}
2 changes: 1 addition & 1 deletion packages/go/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/go",
"description": "gitmars go",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/hook/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/hook",
"description": "gitmars hook",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/utils",
"description": "gitmars utils",
"version": "7.3.0",
"version": "7.4.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand Down
Loading

0 comments on commit 93ddcbf

Please sign in to comment.