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

Does this always pull the latest revanced patch ? #57

Open
casual-coderr opened this issue Aug 23, 2022 · 2 comments
Open

Does this always pull the latest revanced patch ? #57

casual-coderr opened this issue Aug 23, 2022 · 2 comments

Comments

@casual-coderr
Copy link

casual-coderr commented Aug 23, 2022

Hi,
I am sort of new and i don't actually understand how this script always get the latest revanced patch from their repo

get_artifact_download_url() {
    # Usage: get_download_url <repo_name> <artifact_name> <file_type>
    local api_url result
    api_url="https://api.github.com/repos/$1/releases/latest"
    # shellcheck disable=SC2086
    result=$(curl -s $api_url | jq ".assets[] | select(.name | contains(\"$2\") and contains(\"$3\") and (contains(\".sig\") | not)) | .browser_download_url")
    echo "${result:1:-1}"
}

When i run this in actions, It would be helpful to display the version of the artifacts being downloaded instead of showing

Downloading revanced-patches.jar
Downloading revanced-integrations.apk
Downloading revanced-cli.jar

Better show

Downloading revanced-patches-(2.42.0).jar
Downloading revanced-integrations-(0.36.0).apk
Downloading revanced-cli-(2.9.3).jar

in the Runtime

@n0k0m3
Copy link
Owner

n0k0m3 commented Aug 23, 2022

https://api.github.com/repos/<repo-path>/releases/latest is the latest release endpoints of github so it guarantees to download latest patches. I won't do the echoes that you exampled as the file name needs to be constant for the scripts to run, but I can try to print st like Downloading revanced-patches.jar ver x.y.z

@casual-coderr
Copy link
Author

@n0k0m3 Thanks for the explanation for the api. I like your implementation as well, because any kind of intimation of version number will be useful.

@n0k0m3 n0k0m3 closed this as completed Feb 27, 2023
@n0k0m3 n0k0m3 reopened this Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants