contributor-site icon indicating copy to clipboard operation
contributor-site copied to clipboard

./hack/gen-content.sh doesn't work on macOS

Open JamesLaverack opened this issue 1 year ago • 3 comments

The ./hack/gen-content.sh script does not work on macOS, failing with:

$ ./hack/gen-content.sh
./hack/gen-content.sh: line 122: conditional binary operator expected

This is largely due to the outdated version of bash shipped with macOS. Even if you account for that issue, the flags used to grep and sed don't work on BSD grep/sed distributed with macOS

JamesLaverack avatar Mar 19 '24 14:03 JamesLaverack

Don't do what I did, but this is one "workaround":

diff --git a/hack/.gitignore b/hack/.gitignore
new file mode 100644
index 0000000..1757ae4
--- /dev/null
+++ b/hack/.gitignore
@@ -0,0 +1 @@
+tmp.sh
diff --git a/hack/gen-content-macos.sh b/hack/gen-content-macos.sh
new file mode 100755
index 0000000..fcbe0f9
--- /dev/null
+++ b/hack/gen-content-macos.sh
@@ -0,0 +1,6 @@
+set -o errexit
+set -o nounset
+set -o pipefail
+
+cat ./hack/gen-content.sh | gsed 's/sed/gsed/g' | gsed 's/grep/ggrep/g' > ./hack/tmp.sh
+$(brew --prefix)/bin/bash ./hack/tmp.sh

JamesLaverack avatar Mar 19 '24 14:03 JamesLaverack

/kind bug

stmcginnis avatar Mar 19 '24 22:03 stmcginnis

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 17 '24 23:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jul 17 '24 23:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Aug 17 '24 00:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Aug 17 '24 00:08 k8s-ci-robot