Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pack build --force-color in CI instead of script TTY workaround #255

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Feb 5, 2024

As of Pack 0.33.0 (which this repo is using thanks to #462), there is a new --force-color argument that makes pack build output logs in colour even if a TTY wasn't detected (as is the case on GHA):
https://github.com/buildpacks/pack/releases/tag/v0.33.0

This makes the script -e -c TTY workaround unnecessary. (It's also not needed for any direct Cargo usages, since they are covered by the existing CARGO_TERM_COLOR: always.)

I've also:

  • removed a redundant cargo build step (run does a build, and the Cargo compilation output can be suppressed using --quiet)
  • replaced a manual git clone with actions/checkout, since it handles things like retries, faster shallow clones etc.

GUS-W-14968745.

As of Pack 0.33.0 (which this repo is using thanks to #462), there is a
new `--force-color` argument that makes `pack build` output logs
in colour even if a TTY wasn't detected (as is the case on GHA):
https://github.com/buildpacks/pack/releases/tag/v0.33.0

This makes the `script -e -c` TTY workaround in CI unnecessary.

I've also:
 - removed a redundant `cargo build` step (run does a build, and
   the Cargo compilation output can be suppressed using `--quiet`)
- replaced a manual git clone with `actions/checkout`, since it
  handles things like retries, faster shallow clones etc.

GUS-W-14968745.
@edmorley edmorley self-assigned this Feb 5, 2024
@edmorley edmorley marked this pull request as ready for review February 5, 2024 13:13
@edmorley edmorley requested a review from a team as a code owner February 5, 2024 13:13
@edmorley edmorley requested review from schneems and removed request for a team February 5, 2024 13:14
@edmorley edmorley enabled auto-merge (squash) February 5, 2024 13:14
@edmorley edmorley merged commit dda4ede into main Feb 7, 2024
7 checks passed
@edmorley edmorley deleted the edmorley/pack-build-force-color branch February 7, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants