You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the process to install a binary can split into this small pieces:
ask where to save, complete <shorthand_name> or / to github.com// and something else
get release information via api
filter: determine which asset to download (maybe collect user/repo, os, arch, filtered_asset for analytics)
download asset, (timeout, resumable download, skip download if file exists, and use proxy if GITHUB_PROXY env is set)
validate checksum ???
process downloaded asset (call extractors or just copy), smart guess which one is the executable
verify installation
for step 0: to hardcode or not hardcode default shorthands
for step 1: how about updating go-github to v53, as API v3 is stable and versioned. v4 GraphQL api need to authenticated first
for step 2: improve how to score a asset, no more prompt to choose, if the wrong one is chosen, no big deal,
for step 3: in some countries, GitHub is blocked, so how to improve this is significant to UX experience.
for step 4: many release how checksums.txt or else, just guess the file and download it and calculate the asset downloaded from step 3, and find it in txt, and provide BIN_SKIP_CHECKSUM to skip this
for step 5: the asset downloaded from step 3 maybe an archive, need to guess which is the binary we want. (we can exclude README、LICENSE、CHANGELOG etc)
for step 6: verify installation is successful by invoking binary with --help, if it fails, prompt user to submit an issue or try go install or cargo install? AFAIK, cosmtrek/air can't run on CentOS 8 because of GLIBC version, you need to switch to go install method.
and also, I think:
GitHub support is the top priority,
Maybe release canary/dev version of bin?
Less API Calls, it's easy to trigger rate limit when to install a lot, eg. use BrowserDownloadURL not URL to download a asset
Just Save file to disk /tmp/ or other cache folder, if it fails, user can extract it by himself/herself/xxxx.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think the process to install a binary can split into this small pieces:
for step 0: to hardcode or not hardcode default shorthands
for step 1: how about updating go-github to v53, as API v3 is stable and versioned. v4 GraphQL api need to authenticated first
for step 2: improve how to score a asset, no more prompt to choose, if the wrong one is chosen, no big deal,
for step 3: in some countries, GitHub is blocked, so how to improve this is significant to UX experience.
for step 4: many release how checksums.txt or else, just guess the file and download it and calculate the asset downloaded from step 3, and find it in txt, and provide
BIN_SKIP_CHECKSUM
to skip thisfor step 5: the asset downloaded from step 3 maybe an archive, need to guess which is the binary we want. (we can exclude README、LICENSE、CHANGELOG etc)
for step 6: verify installation is successful by invoking binary with --help, if it fails, prompt user to submit an issue or try go install or cargo install? AFAIK,
cosmtrek/air
can't run on CentOS 8 because of GLIBC version, you need to switch to go install method.and also, I think:
Beta Was this translation helpful? Give feedback.
All reactions