Skip to content

Commit

Permalink
release: v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
voocel committed Jul 31, 2022
1 parent 0f0a8a5 commit 46e7972
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
8 changes: 0 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ require (
)

require (
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.7 // indirect
)
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
21 changes: 16 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,19 @@ get_platform () {
}

get_shell_profile() {
if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then
shell_profile="$HOME/.zshrc"
elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then
shell_profile=""
if [[ "${SHELL}" == *"bash"* ]]; then
if [[ -f "$HOME/.bashrc" ]]; then
shell_profile="$HOME/.bashrc"
elif [[ -f "$HOME/.bash_profile" ]]; then
shell_profile="$HOME/.bash_profile"
fi
elif [[ "${SHELL}" == *"zsh"* ]]; then
shell_profile="$HOME/.zshrc"
fi

if [[ -z "$shell_profile" ]]; then
print_error "Get shell_profile error, please set .bashrc"
fi
}

Expand Down Expand Up @@ -135,6 +144,7 @@ set_env() {
fi

# . ${shell_profile}
# source $shell_profile
}

check_curl() {
Expand Down Expand Up @@ -179,13 +189,14 @@ get_sv_bin() {
}

get_latest_tag() {
release=$(curl -s "https://api.github.com/repos/voocel/sv/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
local release=$(curl -s "https://api.github.com/repos/voocel/sv/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
echo "$release"
}

main() {
setup_color
echo "${YELLOW}[1/3] Get sv latest version${RESET}"
get_latest_tag
local release="$(get_latest_tag)"
if [ -z "$release" ]; then
print_error "Get sv latest version error, please try again"
fi
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
svDownload string
)

const Ver = "v1.1.2"
const Ver = "v1.1.3"

func main() {
l.SetLevel("debug")
Expand Down

0 comments on commit 46e7972

Please sign in to comment.