Update logging messages + add coloration#72
Conversation
yes i have bash ansi color coding functions up my back pocket don't ask
|
@Bertie690 this just fell through the cracks sorry. What's the deal with this? Is there some reason you wanted this change? |
|
Thanks, let's make sure your time doesn't go to waste here! |
|
IDK about you, but color-coding logs would have made triaging my extension blowing up a lot easier (not to mention it looks nicer 😀) |
|
@williammartin it appears i forgot the trailing newlines lol |
|
There, much better. |
|
Is a I also think we're maybe going to need to source utils differently with an absolute path since this is a composite action e.g. Let's see what |
There was a problem hiding this comment.
Pull request overview
Adds shared logging/color helpers and updates the release build script’s output to be more structured and user-friendly.
Changes:
- Introduces
utils.shwith ANSI color and logging helper functions (info,success,warn,error,fail). - Updates
build_and_release.shto use the new helpers, improves messaging, and refactors some control flow (e.g., Android prereq checks, per-platform build output). - Adds additional status output for prerelease/draft selection, signing, and asset upload/create steps.
Show a summary per file
| File | Description |
|---|---|
| utils.sh | Adds shared color + logging helper functions intended for use by the build/release script. |
| build_and_release.sh | Switches logging to helper functions, adds per-platform build status messages, and refines Android prereq checks. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
I think i did! |
| @@ -0,0 +1,50 @@ | |||
| #! /bin/bash | |||
| # Annotate text with a blue [...]. | ||
| info () { | ||
| printf "[$(blue ...)] %s\n" "$1" | ||
| } | ||
|
|
||
| # Annotate text with a green [✔]. | ||
| success () { | ||
| printf "[$(green '✔ ')] %s\n" "$1" | ||
| } | ||
|
|
||
| # Annotate text with an orange [!!!] and send it to stderr. | ||
| warn () { | ||
| printf "[$(orange !!!)] %s\n" "$1" >&2 | ||
| } |
There was a problem hiding this comment.
this is actually a really good catch, seen as i copied the utils directly from one of my personal scripts.
| if [[ -z "$ANDROID_SDK_VERSION" ]]; then | ||
| fail "Cannot build for Android without ANDROID_SDK_VERSION environment variable!" | ||
| elif [[ ! -d "$ANDROID_NDK_HOME" ]]; then | ||
| fail "Cannot build for Android without ANDROID_NDK_HOME environment variable!" | ||
| fi |
| # Annotate text with a red [✗] and send it to stderr. | ||
| error () { | ||
| printf "[ $(red '✗') ] %s\n" "$1" >&2 | ||
| } |
Also took the time to document and/or simplify a bit of the code here and there (mostly just merging
ifstogether)