File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed
Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,24 @@ builds:
88 - darwin
99 goarch :
1010 - amd64
11+ - arm64
12+ goamd64 :
13+ - ' '
14+ ignore :
15+ - goos : linux
16+ goarch : arm64
17+ - goos : windows
18+ goarch : arm64
1119 ldflags :
1220 - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
1321archives :
14- - name_template : " {{ .ProjectName }}-{{ .Version }}-{{ .Os }}"
22+ - name_template : " {{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }} "
1523 replacements :
1624 darwin : mac
1725 linux : linux
1826 windows : win
1927 amd64 : x86_64
20- format : tgz
28+ format : tar.gz
2129 format_overrides :
2230 - goos : windows
2331 format : zip
Original file line number Diff line number Diff line change 44PREFIX=/usr/local/bin/
55
66BIN_URLS=$( curl -fsSL https://api.github.com/repos/plesk/pleskapp/releases/latest | grep browser_download_url | cut -d ' "' -f 4)
7- LINUX_ARCHIVE=$( echo " $BIN_URLS " | grep linux.tgz)
8- MAC_ARCHIVE=$( echo " $BIN_URLS " | grep mac.tgz)
97OS_NAME=$( uname -s)
8+ OS_ARCH=$( uname -m)
109
1110if [ " Linux" = " $OS_NAME " -o " Darwin" = " $OS_NAME " ]; then
1211 if [ " Linux" = " $OS_NAME " ]; then
1312 if [ $EUID -ne 0 ]; then
1413 echo " This script must be run as root user"
1514 exit 1
1615 fi
17- curl -fsSL " $LINUX_ARCHIVE " --output plesk-latest.tgz
16+ LINUX_ARCHIVE=$( echo " $BIN_URLS " | grep linux-x86_64.tar.gz)
17+ curl -fsSL " $LINUX_ARCHIVE " --output plesk-latest.tar.gz
1818 fi
1919
20- [ " Darwin" = " $OS_NAME " ] && curl -fsSL " $MAC_ARCHIVE " --output plesk-latest.tgz
20+ if [ " Darwin" = " $OS_NAME " ]; then
21+ if [ " arm64" = " $OS_ARCH " ]; then
22+ MAC_ARCHIVE=$( echo " $BIN_URLS " | grep mac-arm64.tar.gz)
23+ else
24+ MAC_ARCHIVE=$( echo " $BIN_URLS " | grep mac-x86_64.tar.gz)
25+ fi
26+ curl -fsSL " $MAC_ARCHIVE " --output plesk-latest.tar.gz
27+ fi
2128
22- tar xzf plesk-latest.tgz --directory=$PREFIX
23- rm plesk-latest.tgz
29+ tar xzf plesk-latest.tar.gz --directory=$PREFIX
30+ rm plesk-latest.tar.gz
2431 [ -f $PREFIX /plesk ] && echo " The utility 'plesk' has been successfully installed to $PREFIX "
2532else
2633 echo " Unsupported OS."
You can’t perform that action at this time.
0 commit comments