Skip to content

Commit

Permalink
fix: update url
Browse files Browse the repository at this point in the history
  • Loading branch information
wdvxdr1123 committed Mar 28, 2021
1 parent 5b0c693 commit db63cbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit db63cbe

Please sign in to comment.