1 Star 0 Fork 0

冬冬/apfree-wifidog-7.06.2008

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
generate_version.sh 586 Bytes
一键复制 编辑 原始数据 按行查看 历史
冬冬 提交于 2024-06-28 09:09 . init
#!/bin/bash
# Check if a command line argument is provided
if [ $# -eq 0 ]
then
echo "No arguments supplied. Please provide the major version."
exit 1
fi
# Get the major version from the command line argument
major_version=$1
# Get the current branch's commit count
commit_count=$(git rev-list --count HEAD)
# Get the current month
current_month=$(date +%m)
# Define the version
version="${major_version}.${current_month}.${commit_count}"
# Create the version.h file
cat << EOF > src/version.h
#ifndef _VERSION_
#define _VERSION_
#define VERSION "${version}"
#endif
EOF
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/watcherz/apfree-wifidog-7.06.2008.git
[email protected]:watcherz/apfree-wifidog-7.06.2008.git
watcherz
apfree-wifidog-7.06.2008
apfree-wifidog-7.06.2008
master

搜索帮助