Skip to content

Commit

Permalink
feat(webi): show latest project release version on error
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Jan 2, 2024
1 parent f13d582 commit 8e62e12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _webi/installers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var BAD_SH_RE = /[<>'"`$\\]/;
Installers.renderBash = async function (
pkgdir,
rel,
{ baseurl, pkg, tag, ver, os = '', arch = '', libc = '', formats },
{ baseurl, pkg, tag, ver, os = '', arch = '', libc = '', formats, latest },
) {
if (!Array.isArray(formats)) {
formats = [];
Expand Down Expand Up @@ -103,6 +103,7 @@ Installers.renderBash = async function (
['PKG_ARCHES', (rel.arches || []).join(' ')],
['PKG_LIBCS', (rel.libcs || []).join(' ')],
['PKG_FORMATS', (rel.formats || []).join(' ')],
['PKG_LATEST', latest],
];

for (let env of envReplacements) {
Expand Down
1 change: 1 addition & 0 deletions _webi/package-install.tpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ __bootstrap_webi() {
echo ""
echo " $(t_err "Error: no '${PKG_NAME:-"Unknown Package"}@${WEBI_TAG:-"Unknown Tag"}' release for '${WEBI_OS:-"Unknown OS"}' (${WEBI_LIBC:-"Unknown Libc"}) on '${WEBI_ARCH:-"Unknown CPU"}' as one of '${WEBI_FORMATS:-"Unknown File Type"}'")"
echo ""
echo " Latest Version: ${PKG_LATEST}"
echo " CPUs: $PKG_ARCHES"
echo " OSes: $PKG_OSES"
echo " libcs: $PKG_LIBCS"
Expand Down

0 comments on commit 8e62e12

Please sign in to comment.