Skip to content

Commit

Permalink
script updates for version upgrading (#3169)
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz authored Nov 22, 2023
1 parent 83f08b3 commit b1754f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .set_version.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down

0 comments on commit b1754f8

Please sign in to comment.