Skip to content

Commit

Permalink
update token
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Apr 7, 2022
1 parent cf8c1e1 commit 5af1e9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ci/cmd/check_asset/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile))
// get target
target := os.Getenv("TARGET")
if ghToken == "" {
if target == "" {
println("Env ${TARGET} is not set")
os.Exit(1)
}
Expand Down Expand Up @@ -67,7 +67,7 @@ func main() {
panic(err)
}
getReleaseRequest.Header.Set("User-Agent", ua)
getReleaseRequest.Header.Set("Authorization", ghToken)
getReleaseRequest.Header.Set("Authorization", "token "+ghToken)
getReleaseResponse, err := http.DefaultClient.Do(getReleaseRequest)
if err != nil {
panic(err)
Expand Down
6 changes: 3 additions & 3 deletions ci/cmd/upload_asset/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile))
// get target
target := os.Getenv("TARGET")
if ghToken == "" {
if target == "" {
println("Env ${TARGET} is not set")
os.Exit(1)
}
Expand Down Expand Up @@ -91,7 +91,7 @@ func main() {
panic(err)
}
getReleaseRequest.Header.Set("User-Agent", ua)
getReleaseRequest.Header.Set("Authorization", ghToken)
getReleaseRequest.Header.Set("Authorization", "token "+ghToken)
getReleaseResponse, err := http.DefaultClient.Do(getReleaseRequest)
if err != nil {
panic(err)
Expand Down Expand Up @@ -121,7 +121,7 @@ func main() {
panic(err)
}
uploadRequest.Header.Set("User-Agent", ua)
uploadRequest.Header.Set("Authorization", ghToken)
uploadRequest.Header.Set("Authorization", "token "+ghToken)
uploadRequest.Header.Set("Content-Type", contentType)
uploadRequest.ContentLength = contentLength
uploadResponse, err := http.DefaultClient.Do(uploadRequest)
Expand Down

0 comments on commit 5af1e9f

Please sign in to comment.