mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
fix: update url
This commit is contained in:
parent
5b0c693aba
commit
db63cbec82
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@ -27,15 +27,15 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Checkout Dist
|
#- name: Checkout Dist
|
||||||
uses: actions/checkout@v2
|
# uses: actions/checkout@v2
|
||||||
with:
|
# with:
|
||||||
repository: 'gocq/dist'
|
# repository: 'gocq/dist'
|
||||||
ref: master
|
# ref: master
|
||||||
ssh-key: ${{ secrets.SSH_KEY }}
|
# ssh-key: ${{ secrets.SSH_KEY }}
|
||||||
path: upstream/dist
|
# path: upstream/dist
|
||||||
|
|
||||||
- name: Update Dist
|
#- name: Update Dist
|
||||||
run: |
|
# run: |
|
||||||
chmod +x scripts/upload_dist.sh
|
# chmod +x scripts/upload_dist.sh
|
||||||
./scripts/upload_dist.sh
|
# ./scripts/upload_dist.sh
|
||||||
|
9
main.go
9
main.go
@ -514,14 +514,19 @@ func selfUpdate(imageURL string) {
|
|||||||
} else {
|
} else {
|
||||||
log.Info("正在更新,请稍等...")
|
log.Info("正在更新,请稍等...")
|
||||||
url := fmt.Sprintf(
|
url := fmt.Sprintf(
|
||||||
"%v/Mrs4s/go-cqhttp/releases/download/%v/go-cqhttp-%v-%v-%v",
|
"%v/Mrs4s/go-cqhttp/releases/download/%v/go-cqhttp_%v_%v",
|
||||||
func() string {
|
func() string {
|
||||||
if imageURL != "" {
|
if imageURL != "" {
|
||||||
return imageURL
|
return imageURL
|
||||||
}
|
}
|
||||||
return "https://github.com"
|
return "https://github.com"
|
||||||
}(),
|
}(),
|
||||||
version, version, runtime.GOOS, runtime.GOARCH,
|
version, runtime.GOOS, func() string {
|
||||||
|
if runtime.GOARCH == "arm" {
|
||||||
|
return "armv7"
|
||||||
|
}
|
||||||
|
return runtime.GOARCH
|
||||||
|
}(),
|
||||||
)
|
)
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
url += ".zip"
|
url += ".zip"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user