Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic download/update of diyabc/abcranger latest release #16

Closed
gdurif opened this issue Jul 10, 2020 · 4 comments
Closed

Automatic download/update of diyabc/abcranger latest release #16

gdurif opened this issue Jul 10, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request low priority not urgent

Comments

@gdurif
Copy link
Collaborator

gdurif commented Jul 10, 2020

Write a script to automatically download latest release of diyabc and abcranger

@gdurif gdurif added enhancement New feature or request low priority not urgent labels Jul 10, 2020
@gdurif gdurif self-assigned this Jul 10, 2020
@gdurif
Copy link
Collaborator Author

gdurif commented Jul 10, 2020

Two needs (but more or less same implementation):

  • download latest release at package installation
  • download latest release before standalone app build

@fradav
Copy link
Contributor

fradav commented Jul 10, 2020

Needs curl and jq.
Suppose you want the latest release of diyabc binary for windows (not drafted or prerelease)

curl -s https://api.github.com/repos/diyabc/diyabc/releases | \
  jq -r '[[.[] |
    select(.draft != true) |
    select(.prerelease != true)][0] |
    .assets |
    .[] |
    select(.name | startswith("diyabc-windows")) |
    .browser_download_url][0]' | xargs curl -LO

@fradav
Copy link
Contributor

fradav commented Jul 10, 2020

If you want to do in R, the most obvious way is to get the https://api.github.com/repos/diyabc/diyabc/releases content in JSON and parse it for the binary link

@gdurif
Copy link
Collaborator Author

gdurif commented Jul 10, 2020

Done in diyabcGUI with dl_latest_bin and dl_all_latest_bin functions

Also check script update_bin_release.R

@gdurif gdurif closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority not urgent
Projects
None yet
Development

No branches or pull requests

2 participants