【无标题】submodule tag

https://blog.csdn.net/rikeyone/article/details/103586453

(259条消息) 内核 seq_file 操作函数_seq_printf_程序猿Ricky的日常干货的博客-CSDN博客

```
#!/bin/bash

DIR_ROOT=`pwd`
TAG_NAME=`date +%F | sed 's/-//g'``date +%T | sed 's/://g'`
TAG_COMMENT="Tag made on `date`"

if [[ "$1" == "-h" || "$1" == "--help" ]]; then
    echo "Usage: $0 [-h/--help] [tab_name] [tag_comment]"
    exit 0
fi

if [ $# -gt 0 ]; then
TAG_NAME=$1
fi

if [ $# -gt 1 ]; then
TAG_COMMENT=$2
fi

GIT_MODULE_DIR=("." "alios_things" "miniapp_framework" "app")
for DIR_MODULE in ${GIT_MODULE_DIR[*]}
do
    cd $DIR_ROOT/$DIR_MODULE
    git tag -a "${TAG_NAME}" -m "${TAG_COMMENT}"
    git push origin "${TAG_NAME}"
done

```

你可能感兴趣的:(git)