Update gotemplate version
This commit is contained in:
parent
39c4348bda
commit
de14c30c48
@ -6,21 +6,30 @@ set -euo pipefail
|
|||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
APP=gotemplate
|
APP=gotemplate
|
||||||
VERSION=${VERSION:-3.7.5}
|
VERSION=${VERSION:-3.12.0}
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
||||||
|
|
||||||
main() (
|
main() (
|
||||||
URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os)_64-bits.zip
|
URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os).zip
|
||||||
|
|
||||||
extract_zip "${URL}" "${DEST}/${VERSION}"
|
extract_zip "${URL}" "${DEST}/${VERSION}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
get_os() (
|
get_os() (
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Linux*) echo linux ;;
|
Linux*)
|
||||||
Darwin*) echo macOS ;;
|
case $(uname -m) in
|
||||||
|
aarch64) echo linux_arm64 ;;
|
||||||
|
x86_64) echo linux_amd64 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
Darwin*) echo darwin_all ;;
|
||||||
|
MINGW64_NT-*) echo windows_amd64 ;;
|
||||||
|
CYGWIN_NT-*) echo windows_amd64 ;;
|
||||||
*)
|
*)
|
||||||
echo >&2 "unsupported os: $(uname -s)"
|
echo >&2 "unsupported os: $(uname -s)"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user