Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

shared: Bold postversion output, to try to stand out in npm's noise.

Greg Priceed68a18de4c4
diff --git a/static/shared/tools/npm-postversion b/static/shared/tools/npm-postversion
index c9079ecde44..94ebc9da594 100755
--- a/static/shared/tools/npm-postversion
+++ b/static/shared/tools/npm-postversion
@@ -1,14 +1,26 @@
#!/usr/bin/env bash
set -eu -o pipefail
+should_color=
+if [ -t 2 ]; then # if we're sending to a terminal
+ should_color=yes
+fi
+
+reset=
+bold=
+if [ -n "${should_color}" ]; then
+ reset=$'\033'[0m
+ bold=$'\033'[1m
+fi
+
echo >&2 "\
-Version updated: ${npm_package_version}
+Version updated: ${bold}${npm_package_version}${reset}
Next steps:
- \$ git log --stat -p upstream.. # check your work!
+ \$ ${bold}git log --stat -p upstream..${reset} # check your work!
- \$ git push upstream main shared-${npm_package_version}
+ \$ ${bold}git push upstream main shared-${npm_package_version}${reset}
- \$ npm publish # should prompt for an OTP, from your 2FA setup
+ \$ ${bold}npm publish${reset} # should prompt for an OTP, from your 2FA setup
"