Update go-update
This commit is contained in:
parent
01b5be31d6
commit
c90676bcb1
@ -15,7 +15,11 @@ BASE_GO_PATH=$(echo $CURRENT_GO_PATH | sed 's/\/bin\/go//g')
|
|||||||
ROOT_GO_PATH=$(echo $BASE_GO_PATH | sed 's/\/go//g')
|
ROOT_GO_PATH=$(echo $BASE_GO_PATH | sed 's/\/go//g')
|
||||||
# echo "Current Go path: $CURRENT_GO_PATH | Base Go path: $BASE_GO_PATH | Root Go path: $ROOT_GO_PATH"
|
# echo "Current Go path: $CURRENT_GO_PATH | Base Go path: $BASE_GO_PATH | Root Go path: $ROOT_GO_PATH"
|
||||||
|
|
||||||
UPDATE_GO_VERSION=${1:-}
|
#UPDATE_GO_VERSION=${1:-}
|
||||||
|
FETCH_FROM_GO_VERSION=$(curl -s https://go.dev/VERSION?m=text)
|
||||||
|
echo "Latest fetched from: https://go.dev/VERSION => $FETCH_FROM_GO_VERSION"
|
||||||
|
|
||||||
|
UPDATE_GO_VERSION=$(echo $FETCH_FROM_GO_VERSION | sed 's/^go//')
|
||||||
|
|
||||||
if [ -z "$UPDATE_GO_VERSION" ]; then
|
if [ -z "$UPDATE_GO_VERSION" ]; then
|
||||||
echo "Usage: $0 <go-version> | Example: $0 1.19.5"
|
echo "Usage: $0 <go-version> | Example: $0 1.19.5"
|
||||||
|
Loading…
Reference in New Issue
Block a user