Skip to content

Commit

Permalink
action: beautify release
Browse files Browse the repository at this point in the history
Signed-off-by: rahulkhatri137 <[email protected]>
  • Loading branch information
rahulkhatri137 committed Apr 9, 2023
1 parent 740c835 commit 2756c2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ get_prebuilts() {
local rv_cli_url rv_integrations_url rv_patches rv_patches_changelog rv_patches_dl rv_patches_url rv_integrations_rel rv_patches_rel
rv_cli_url=$(gh_req "https://api.github.com/repos/inotia00/revanced-cli/releases/latest" - | json_get 'browser_download_url') || return 1
RV_CLI_JAR="${PREBUILTS_DIR}/${rv_cli_url##*/}"
log "CLI: ${rv_cli_url##*/}"
log "**CLI**: _${rv_cli_url##*/}_"
rv_integrations_rel="https://api.github.com/repos/inotia00/revanced-integrations/releases/latest"
rv_patches_rel="https://api.github.com/repos/inotia00/revanced-patches/releases/latest"
rv_integrations_url=$(gh_req "$rv_integrations_rel" - | json_get 'browser_download_url')
RV_INTEGRATIONS_APK="${PREBUILTS_DIR}/${rv_integrations_url##*/}"
log "Integrations: ${rv_integrations_url##*/}"
log "**Integrations**: _${rv_integrations_url##*/}_"

rv_patches=$(gh_req "$rv_patches_rel" -)
rv_patches_changelog=$(json_get 'body' <<<"$rv_patches" | sed 's/\(\\n\)\+/\\n/g')
Expand All @@ -55,8 +55,8 @@ get_prebuilts() {
rv_patches_url=$(grep 'jar' <<<"$rv_patches_dl")
RV_PATCHES_JAR="${PREBUILTS_DIR}/${rv_patches_url##*/}"
[ -f "$RV_PATCHES_JAR" ] || REBUILD=true
log "Patches: ${rv_patches_url##*/}"
log "\n${rv_patches_changelog//# [/### [}\n"
log "**Patches**: _${rv_patches_url##*/}_\n"
log "**Changelog**: [Here](https://github.com/inotia00/revanced-patches/releases/)\n"

dl_if_dne "$RV_CLI_JAR" "$rv_cli_url"
dl_if_dne "$RV_INTEGRATIONS_APK" "$rv_integrations_url"
Expand Down Expand Up @@ -249,11 +249,7 @@ build_rv() {
fi
fi
fi
if [ "${arch}" = "all" ]; then
grep -q "${app_name}:" build.md || log "${app_name}: ${version}"
else
grep -q "${app_name} (${arch}):" build.md || log "${app_name} (${arch}): ${version}"
fi
grep -q "${app_name}:" build.md || log "${app_name}: ${version}"
if [ "${args[merge_integrations]}" = true ]; then
p_patcher_args+=("-m ${RV_INTEGRATIONS_APK}")
fi
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mkdir -p "$BUILD_DIR" "$PREBUILTS_DIR"
if [ "${NOSET:-}" = true ]; then set_prebuilts; else get_prebuilts || set_prebuilts; fi
jq --version >/dev/null || abort "\`jq\` is not installed. install it with 'apt install jq' or equivalent"

log "**App Versions:**"
log "### **App Versions:**"
for table_name in $(toml_get_table_names); do
if [ -z "$table_name" ]; then continue; fi
t=$(toml_get_table "$table_name")
Expand Down

0 comments on commit 2756c2e

Please sign in to comment.