Skip to content

Update logging messages + add coloration#72

Open
Bertie690 wants to merge 7 commits into
cli:trunkfrom
Bertie690:log-msg
Open

Update logging messages + add coloration#72
Bertie690 wants to merge 7 commits into
cli:trunkfrom
Bertie690:log-msg

Conversation

@Bertie690
Copy link
Copy Markdown
Contributor

Also took the time to document and/or simplify a bit of the code here and there (mostly just merging ifs together)

yes i have bash ansi color coding functions up my back pocket don't ask
@Bertie690 Bertie690 requested a review from a team as a code owner October 24, 2025 22:08
@Bertie690 Bertie690 requested a review from babakks October 24, 2025 22:08
@williammartin
Copy link
Copy Markdown
Member

@Bertie690 this just fell through the cracks sorry. What's the deal with this? Is there some reason you wanted this change?

@Bertie690
Copy link
Copy Markdown
Contributor Author

#71 (comment)

@williammartin williammartin requested a review from BagToad May 20, 2026 12:30
@williammartin
Copy link
Copy Markdown
Member

Thanks, let's make sure your time doesn't go to waste here!

@Bertie690
Copy link
Copy Markdown
Contributor Author

IDK about you, but color-coding logs would have made triaging my extension blowing up a lot easier (not to mention it looks nicer 😀)

@Bertie690
Copy link
Copy Markdown
Contributor Author

@williammartin it appears i forgot the trailing newlines lol

@Bertie690
Copy link
Copy Markdown
Contributor Author

There, much better.

@williammartin
Copy link
Copy Markdown
Member

williammartin commented May 20, 2026

Is a quit function actually defined anywhere? Did you maybe mean fail?

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. source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" However, I'd personally be fine with just inlining that content as it was to begin with. It's nice to have the whole thing self contained.

Let's see what copilot reviews as well. Edit: heh, there it is.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh with ANSI color and logging helper functions (info, success, warn, error, fail).
  • Updates build_and_release.sh to 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

Comment thread build_and_release.sh Outdated
Comment thread build_and_release.sh Outdated
Comment thread build_and_release.sh
Comment thread utils.sh
@Bertie690
Copy link
Copy Markdown
Contributor Author

Is a quit function actually defined anywhere? Did you maybe mean fail?

I think i did!

@Bertie690 Bertie690 requested a review from Copilot June 1, 2026 01:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread utils.sh
@@ -0,0 +1,50 @@
#! /bin/bash
Comment thread utils.sh
Comment on lines +24 to +37
# 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
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually a really good catch, seen as i copied the utils directly from one of my personal scripts.

Comment thread build_and_release.sh
Comment on lines +31 to +35
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
Comment thread utils.sh
Comment on lines +39 to +42
# Annotate text with a red [✗] and send it to stderr.
error () {
printf "[ $(red '✗') ] %s\n" "$1" >&2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants