derpixler/git-tag-release-automator

自动为主要/次要/补丁版本进行 Git 释放标签和分支创建。

v1.5.0 2023-05-24 18:31 UTC

This package is auto-updated.

Last update: 2024-09-14 19:31:33 UTC


README

GitHub tag (latest SemVer) PowerShell License: GPL v3 Downloads

🚀 使用 Git-Tag-Release-Automator 节省时间!

如果你是 git flow 的粉丝,并在发布流程中使用标签,我敢说你一定在手动确定最新的 git 标签和创建匹配的发布分支时感到烦恼。如果有办法自动化这个过程来节省时间、精力和错误,那会怎么样呢?

此脚本自动化以下操作

  • 🥇 释放标签
  • 🥇 创建主要和次要版本匹配的发布分支
  • 🥇 防止创建没有相关更改的标签

Shell 脚本

  • 🎂 提供初始化动作
  • 🎊 获取最新的 Git 标签
  • 🚑 提醒用户增加主版本、次版本或补丁版本
  • 📽️ 根据用户的选择获取最后一个标签
  • 👾 检查是否存在基于新标签的现有发布分支,如 "release/v1.1.0"
  • 🥇 在推送新标签之前,验证发布分支中的更改

安装

composer require derpixler/git-tag-release-automator

执行

./vendor/bin/git-tag-release-automator

在操作中创建新的标签命令

❯ ./vendor/bin/git-tag-release-automator
Latest tag: v1.1.0
Which part of the version do you want to increase: Major (M), Minor (m) or Patch (p)? (M.m.p)
Your choice: p

Switched to existing release branch release/v1.1.0

Git tag v1.1.1 created and pushed successfully.

一些见解

为新项目设置初始环境。

❯ ./vendor/bin/git-tag-release-automator
There are no existing tags. Do you want to create a tag starting with 'v'? (y/n)
Your choice: y

No "release/v1.0.0" found, create one? (y/n)
Your choice: y

Release branch "release/v1.0.0" created.
Now you can merge into "release/v1.0.0" and create tags.

创建新标签,但没有匹配的发布分支。

❯ ./vendor/bin/git-tag-release-automator
Latest tag: v1.4.1

Which part of the version do you want to increase: Major (M), minor (m) or patch (p)?
Your choice: m

No "release/v1.5.0" found, create one? (y/n)
Your choice: y

Release branch "release/v1.5.0" created.
Now you can merge into "release/v1.5.0" and create tags.

创建新次要版本标签。

❯ ./vendor/bin/git-tag-release-automator
Latest tag: v1.4.1

Which part of the version do you want to increase: Major (M), minor (m) or patch (p)?
Your choice: m

Git tag v1.5.0 created and pushed successfully.

创建新补丁版本标签

❯ ./vendor/bin/git-tag-release-automator
Latest tag: v1.5.0

Which part of the version do you want to increase: Major (M), minor (m) or patch (p)?
Your choice: p

Git tag v1.5.1 created and pushed successfully.

🤙 联系