ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    Git 自动化TAG标签脚本

    Feb 1, 202410 min read
    #!/bin/bash
    
    # 获取最新的tag
    latest_tag=$(git tag -l | sort -V | tail -n1)
    major=$(echo $latest_tag | cut -d '.' -f 1)
    minor=$(echo $latest_tag | cut -d '.' -f 2)
    patch=$(echo $latest_tag | cut -d '.' -f 3)
    new_patch=$((patch + 1))
    new_tag="${major}.${minor}.${new_patch}"
    echo "New tag: $new_tag"
    git tag $new_tag
    git push origin $new_tag
    echo "Tag $new_tag has been created and pushed to remote."
    
    

    相关文章

    Typescript typeof 使用场景

    该代码示例展示了如何使用 TypeScript 的 `typeof` 和 `keyof` 操作符来获取对象实例的类型及其键集合,以便于动态访问配置对象。

    Flutter 获取 widget 的实际宽高

    使用 `LayoutBuilder` 和 `MediaQuery.of` 可以获取并适应不同屏幕大小的 widget 的实际宽度和高度。

    No matching distribution found for tiktoken

    The "No matching distribution found for tiktoken" error occurs when trying to install a non-existent or misspelled package in Python, suggesting verification of the package name, checking availability in repositories, compatibility with Python version, and permissions, with further assistance recommended if issues persist.

    如何使用 html2canvas将DOM转换成canvas

    使用 html2canvas 库可以将 DOM 元素或整个页面转换为 canvas,并可通过配置选项如 scale 来调整转换效果。

    猫盘安装Docker

    该脚本用于在猫盘上自动安装Docker,并配置Portainer以通过浏览器管理Docker。