Merge pull request #1108 from xushiwei/q
github api: release/asset id => int64
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
|||||||
// ReleaseAsset represents a GitHub release asset.
|
// ReleaseAsset represents a GitHub release asset.
|
||||||
type ReleaseAsset struct {
|
type ReleaseAsset struct {
|
||||||
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/assets/242245930
|
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/assets/242245930
|
||||||
ID int `json:"id"` // 242245930
|
ID int64 `json:"id"` // 242245930
|
||||||
NodeID string `json:"node_id"` // RA_kwDOAC8YHs4OcGEq
|
NodeID string `json:"node_id"` // RA_kwDOAC8YHs4OcGEq
|
||||||
Name string `json:"name"` // flint-3.2.2.tar.gz
|
Name string `json:"name"` // flint-3.2.2.tar.gz
|
||||||
ContentType string `json:"content_type"` // application/x-gtar
|
ContentType string `json:"content_type"` // application/x-gtar
|
||||||
@@ -38,7 +38,7 @@ type ReleaseAsset struct {
|
|||||||
// Release represents a GitHub release.
|
// Release represents a GitHub release.
|
||||||
type Release struct {
|
type Release struct {
|
||||||
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/209285187
|
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/209285187
|
||||||
ID int `json:"id"` // 209285187
|
ID int64 `json:"id"` // 209285187
|
||||||
NodeID string `json:"node_id"` // RE_kwDOAC8YHs4MeXBD
|
NodeID string `json:"node_id"` // RE_kwDOAC8YHs4MeXBD
|
||||||
TagName string `json:"tag_name"` // v3.2.2
|
TagName string `json:"tag_name"` // v3.2.2
|
||||||
TargetCommitish string `json:"target_commitish"` // b8223680e38ad048355a421bf7f617bb6c5d5e12
|
TargetCommitish string `json:"target_commitish"` // b8223680e38ad048355a421bf7f617bb6c5d5e12
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package cppkg
|
package cppkg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -78,14 +77,12 @@ func (p *Tool) Get(quietInstall bool) (app string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Tool) getAppManager() (amPath string, install []string, err error) {
|
func (p *Tool) getAppManager() (amPath string, install []string, err error) {
|
||||||
var notFoundMgs []string
|
|
||||||
for _, install = range p.installs {
|
for _, install = range p.installs {
|
||||||
am := install[0]
|
am := install[0]
|
||||||
if amPath, err = exec.LookPath(am); err == nil {
|
if amPath, err = exec.LookPath(am); err == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
notFoundMgs = append(notFoundMgs, am)
|
|
||||||
}
|
}
|
||||||
err = fmt.Errorf("app managers not found: %s: %w", strings.Join(notFoundMgs, ", "), ErrNotFound)
|
err = ErrNotFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user