1
0
mirror of https://github.com/gogf/gf.git synced 2025-04-05 11:18:50 +08:00

script updates for version upgrading (#3169)

This commit is contained in:
海亮 2023-11-22 20:49:07 +08:00 committed by GitHub
parent 83f08b3135
commit b1754f8254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
echo "Parameter exception, please execute in the format of $0 [directory] [version number]"
echo "PS$0 ./ v2.4.0"
@ -20,6 +19,13 @@ workdir=.
newVersion=$2
echo "Prepare to replace the GF library version numbers in all go.mod files in the ${workdir} directory with ${newVersion}"
# check find command support or not
output=$(find "${workdir}" -name go.mod 2>&1)
if [[ $? -ne 0 ]]; then
echo "Error: please use bash or zsh to run!"
exit 1
fi
if [[ true ]]; then
echo "package gf" > version.go
echo "" >> version.go