mirror of
https://github.com/xiaoqidun/gitcz.git
synced 2025-12-14 19:28:25 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 021a8e521b | |||
| 835ce6ed56 | |||
| 4d815a6e81 | |||
| ae8060fc9e | |||
| 49e77c8325 | |||
| ded2a32ce6 | |||
| 8c594faab7 | |||
| 945c08d9c3 | |||
| 1364c50b90 | |||
| 9743118378 | |||
| d898a07ea9 | |||
| 5a879147b9 |
27
.drone.yml
27
.drone.yml
@@ -1,27 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: generate
|
|
||||||
pull: if-not-exists
|
|
||||||
image: hkccr.ccs.tencentyun.com/xiaoqidun/build
|
|
||||||
commands:
|
|
||||||
- build -f build.sh -i gitcz.go -o release/gitcz
|
|
||||||
- name: build
|
|
||||||
pull: if-not-exists
|
|
||||||
image: hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
|
||||||
commands:
|
|
||||||
- ./build.sh
|
|
||||||
- name: upload
|
|
||||||
image: hkccr.ccs.tencentyun.com/xiaoqidun/gocos
|
|
||||||
settings:
|
|
||||||
secret_id:
|
|
||||||
from_secret: cos_secret_id
|
|
||||||
secret_key:
|
|
||||||
from_secret: cos_secret_key
|
|
||||||
bucket_url:
|
|
||||||
from_secret: cos_bucket_url
|
|
||||||
source: release/
|
|
||||||
target: product/gitcz
|
|
||||||
strip_prefix: release/
|
|
||||||
28
.gitea/workflows/build.yaml
Normal file
28
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
on: [push, workflow_dispatch]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: cn
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: generate
|
||||||
|
uses: docker://ccr.ccs.tencentyun.com/xiaoqidun/build:latest
|
||||||
|
with:
|
||||||
|
args: -f build.sh -i gitcz.go -o release/gitcz
|
||||||
|
- name: docker goenv
|
||||||
|
uses: docker://ccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
|
||||||
|
env:
|
||||||
|
GIT_SERVER: ${{ secrets.git_server }}
|
||||||
|
GIT_USER: ${{ secrets.git_user }}
|
||||||
|
GIT_TOKEN: ${{ secrets.git_token }}
|
||||||
|
with:
|
||||||
|
args: bash build.sh
|
||||||
|
- name: upload to cos
|
||||||
|
uses: xiaoqidun/gocos@main
|
||||||
|
with:
|
||||||
|
secret_id: ${{ secrets.cos_secret_id }}
|
||||||
|
secret_key: ${{ secrets.cos_secret_key }}
|
||||||
|
bucket_url: ${{ secrets.cos_bucket_url }}
|
||||||
|
source_path: release
|
||||||
|
target_path: product/gitcz
|
||||||
|
strip_prefix: release
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.devcontainer/
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
# gitcz
|
# gitcz
|
||||||
|
|
||||||
Golang 版本 Git Commitizen,commit 规范工具
|
Go语言Git Commitizen,commit规范工具
|
||||||
|
|
||||||
# 快速安装
|
# 快速安装
|
||||||
|
|
||||||
|
```
|
||||||
go install github.com/xiaoqidun/gitcz@latest
|
go install github.com/xiaoqidun/gitcz@latest
|
||||||
|
```
|
||||||
|
|
||||||
# 编译安装
|
# 编译安装
|
||||||
|
|
||||||
@@ -35,4 +37,4 @@ git push
|
|||||||
|
|
||||||
# 规范文档
|
# 规范文档
|
||||||
|
|
||||||
gitcz 使用:[angular git commit 规范](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines)
|
gitcz 使用 [angular git commit](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) 规范
|
||||||
|
|||||||
4
gitcz.go
4
gitcz.go
@@ -32,8 +32,8 @@ var (
|
|||||||
InputScopePrompt = "说明本次提交的影响范围(必填): "
|
InputScopePrompt = "说明本次提交的影响范围(必填): "
|
||||||
InputSubjectPrompt = "对本次提交进行简短描述(必填): "
|
InputSubjectPrompt = "对本次提交进行简短描述(必填): "
|
||||||
InputBodyPrompt = "对本次提交进行完整描述(选填): "
|
InputBodyPrompt = "对本次提交进行完整描述(选填): "
|
||||||
InputBreakingChangePrompt = "如果当前代码版本与上一版本不兼容,对变动、变动的理由及迁移的方法进行描述(选填): "
|
InputBreakingChangePrompt = "如果当前代码版本与上一版本不兼容, 对变动、变动的理由及迁移的方法进行描述(选填): "
|
||||||
InputClosesPrompt = "如果本次提交针对某个issue,列出关闭的issues(选填): "
|
InputClosesPrompt = "如果本次提交针对某个issue, 列出关闭的issues(选填): "
|
||||||
)
|
)
|
||||||
|
|
||||||
var CzTypeList = []CzType{
|
var CzTypeList = []CzType{
|
||||||
|
|||||||
Reference in New Issue
Block a user