1
0
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:
wdvxdr 2021-03-28 20:06:04 +08:00
parent 5b0c693aba
commit db63cbec82
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
2 changed files with 18 additions and 13 deletions

View File

@ -27,15 +27,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Dist
uses: actions/checkout@v2
with:
repository: 'gocq/dist'
ref: master
ssh-key: ${{ secrets.SSH_KEY }}
path: upstream/dist
#- name: Checkout Dist
# uses: actions/checkout@v2
# with:
# repository: 'gocq/dist'
# ref: master
# ssh-key: ${{ secrets.SSH_KEY }}
# path: upstream/dist
- name: Update Dist
run: |
chmod +x scripts/upload_dist.sh
./scripts/upload_dist.sh
#- name: Update Dist
# run: |
# chmod +x scripts/upload_dist.sh
# ./scripts/upload_dist.sh

View File

@ -514,14 +514,19 @@ func selfUpdate(imageURL string) {
} else {
log.Info("正在更新,请稍等...")
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 {
if imageURL != "" {
return imageURL
}
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" {
url += ".zip"