revanced-build-template
revanced-build-template copied to clipboard
Does this always pull the latest revanced patch ?
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
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
@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.