diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6cb442..5c39301 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: t=$(toml_get_table YouTube) v=$(toml_get "$t" "version") || v="" if isoneof "$v" latest beta; then - cur_yt=$(sed -n 's/.*YouTube: \(.*\)/\1/p' build.md | xargs) + cur_yt=$(grep -F '**YouTube:**' build.md | cut -d' ' -f2) [ -z "$cur_yt" ] && return 1 # empty, fail=>dont build if [ "$v" = beta ]; then aav="true"; else aav="false"; fi last_ver=$(get_apkmirror_vers youtube "$aav" | get_largest_ver) @@ -44,7 +44,7 @@ jobs: PATCHES_SRC=$(toml_get "$(toml_get_table "")" patches-source) || PATCHES_SRC="revanced/revanced-patches" last_patches_url=$(gh_req https://api.github.com/repos/${PATCHES_SRC}/releases/latest - | json_get 'browser_download_url' | grep 'jar') last_patches=${last_patches_url##*/} - cur_patches=$(sed -n "s/.*Patches: .*${PATCHES_SRC%%/*}\/\(.*\)/\1/p" build.md | xargs) + cur_patches=$(grep -F "**Patches:** ${PATCHES_SRC%%/*}" build.md | cut -d' ' -f2) echo "current patches version: $cur_patches" echo "latest patches version: $last_patches" if [ -z "$cur_patches" ] || [ -z "$last_patches" ]; then return 1; fi diff --git a/utils.sh b/utils.sh index dec04d5..458bea1 100755 --- a/utils.sh +++ b/utils.sh @@ -55,7 +55,7 @@ get_rv_prebuilts() { rv_cli_url=$(gh_req "https://api.github.com/repos/j-hc/revanced-cli/releases/latest" - | json_get 'browser_download_url') || return 1 local rv_cli_jar="${TEMP_DIR}/jhc-rv/${rv_cli_url##*/}" - echo "CLI: $(cut -d/ -f4 <<<"$rv_cli_url")/$(cut -d/ -f9 <<<"$rv_cli_url") " >"$patches_dir/changelog.md" + echo "**CLI:** $(cut -d/ -f4 <<<"$rv_cli_url")/$(cut -d/ -f9 <<<"$rv_cli_url") " >"$patches_dir/changelog.md" local rv_integrations_rel="https://api.github.com/repos/${integrations_src}/releases/" if [ "$integrations_ver" ]; then rv_integrations_rel+="tags/${integrations_ver}"; else rv_integrations_rel+="latest"; fi @@ -64,7 +64,7 @@ get_rv_prebuilts() { rv_integrations_url=$(gh_req "$rv_integrations_rel" - | json_get 'browser_download_url') local rv_integrations_apk="${integrations_dir}/${rv_integrations_url##*/}" - echo "Integrations: $(cut -d/ -f4 <<<"$rv_integrations_url")/$(cut -d/ -f9 <<<"$rv_integrations_url") " >>"$patches_dir/changelog.md" + echo "**Integrations:** $(cut -d/ -f4 <<<"$rv_integrations_url")/$(cut -d/ -f9 <<<"$rv_integrations_url") " >>"$patches_dir/changelog.md" rv_patches=$(gh_req "$rv_patches_rel" -) rv_patches_changelog=$(json_get 'body' <<<"$rv_patches" | sed 's/\(\\n\)\+/\\n/g') @@ -73,7 +73,7 @@ get_rv_prebuilts() { rv_patches_url=$(grep 'jar' <<<"$rv_patches_dl") local rv_patches_jar="${patches_dir}/${rv_patches_url##*/}" [ -f "$rv_patches_jar" ] || REBUILD=true - echo "Patches: $(cut -d/ -f4 <<<"$rv_patches_url")/$(cut -d/ -f9 <<<"$rv_patches_url") " >>"$patches_dir/changelog.md" + echo "**Patches:** $(cut -d/ -f4 <<<"$rv_patches_url")/$(cut -d/ -f9 <<<"$rv_patches_url") " >>"$patches_dir/changelog.md" echo -e "\n${rv_patches_changelog//# [/### [}\n---" >>"$patches_dir/changelog.md" dl_if_dne "$rv_cli_jar" "$rv_cli_url" >&2 @@ -149,6 +149,7 @@ get_patch_last_supported_ver() { inc_sel=${inc_sel:-false} if [ "$4" = false ]; then inc_sel="${inc_sel} or .excluded==false"; fi jq -r ".[] + | .name |= ascii_downcase | .name |= gsub(\"\\\\s\";\"-\") | select(.compatiblePackages[].name==\"${1}\") | select(${inc_sel}) | select(${exc_sel:-true}) @@ -364,7 +365,7 @@ build_rv() { done if [ ! -f "$stock_apk" ]; then return 0; fi fi - log "${table}: ${version}" + log "**${table}:** ${version}" if [ "${args[merge_integrations]}" = true ]; then p_patcher_args+=("-m ${args[integ]}"); fi local microg_patch