release.sh: Stop packages from inlining alternate executable names

This commit is contained in:
Ethan P 2020-10-04 00:57:57 -07:00
parent 1f7d9c3fcc
commit 3c5651bde9
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -60,7 +60,7 @@ fi
# Generate the new bin files.
printc "%{YELLOW}Building scripts...%{CLEAR}\n"
"$HERE/build.sh" --minify=all --alternate-executable='bat' &>/dev/null || {
"$HERE/build.sh" --minify=all --alternate-executable='bat' --no-inline &>/dev/null || {
printc "%{RED}FAILED TO BUILD SCRIPTS.%{CLEAR}\n"
printc "%{RED}CAN NOT PROCEED WITH RELEASE.%{CLEAR}\n"
exit 1
@ -70,9 +70,13 @@ printc "%{YELLOW}Building scripts...%{CLEAR}\n"
# Build package.
printc "%{YELLOW}Packaging artifacts...%{CLEAR}\n"
zip -r "$OPT_ARTIFACT" \
"$OPT_BIN_DIR" \
"$OPT_DOC_DIR"
(
rm "$OPT_ARTIFACT"
cd "$(dirname "$OPT_BIN_DIR")"
zip -r "$OPT_ARTIFACT" "$(basename "$OPT_BIN_DIR")"
cd "$(dirname "$OPT_DOC_DIR")"
zip -ru "$OPT_ARTIFACT" "$(basename "$OPT_DOC_DIR")"
)
printc "%{YELLOW}Package created as %{BLUE}%s%{YELLOW}.%{CLEAR}\n" "$OPT_ARTIFACT"
@ -97,7 +101,6 @@ case "$DATE_DAY" in
esac
DATE_STR="$(date +'%B') ${DATE_DAY}${DATE_SUFFIX}, $(date +'%Y')"
# Get the script names.
script_links=()
script_names=()
@ -111,7 +114,6 @@ script_pattern="$(printf 's/\\(%s\\)/`\\1`/;' "${script_names[@]}")"
SCRIPTS="$(printf "%s, " "${script_links[@]:0:$((${#script_links[@]} - 1))}")"
SCRIPTS="${SCRIPTS}and ${script_links[$((${#script_links[@]} - 1))]}"
# Get the changelog.
CHANGELOG_DEV=''
CHANGELOG=''
@ -151,7 +153,6 @@ fi
CHANGELOG="$(sed "$script_pattern" <<< "$CHANGELOG")"
CHANGELOG_DEV="$(sed "$script_pattern" <<< "$CHANGELOG_DEV")"
# Print the template.
sed '/\\$/{N;s/\\\n//;s/\n//p;}' <<- EOF
This contains the latest versions of $SCRIPTS as of commit [$(git rev-parse --short HEAD)]($COMMIT_URL) (${DATE_STR}).