Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion catalogd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ cert-manager:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MGR_VERSION}/cert-manager.yaml
kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-webhook --timeout=60s

.PHONY: demo-update
# The demo script requires to install asciinema with: brew install asciinema to run on mac os envs.
.PHONY: demo-update #HELP build demo
demo-update:
hack/scripts/generate-asciidemo.sh

Expand Down
2 changes: 1 addition & 1 deletion catalogd/hack/scripts/generate-asciidemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ while getopts 'h' flag; do
done
set -u

WKDIR=$(mktemp -td generate-asciidemo.XXXXX)
WKDIR=$(mktemp -d -t generate-asciidemo.XXXXX)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @grokspawn ^ it is the problem with mac os.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See:

Hey @camilamacedo86 have you done this setup?

See:

$ brew install bash gnu-tar gsed
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
Warning: bash 5.2.37 is already installed and up-to-date.
To reinstall 5.2.37, run:
  brew reinstall bash
Warning: gnu-sed 4.9 is already installed and up-to-date.
To reinstall 4.9, run:
  brew reinstall gnu-sed
==> Downloading https://ghcr.io/v2/homebrew/core/gnu-tar/manifests/1.35-1
######################################################################### 100.0%
==> Fetching gnu-tar
==> Downloading https://ghcr.io/v2/homebrew/core/gnu-tar/blobs/sha256:83fe22ea67
######################################################################### 100.0%
==> Pouring gnu-tar--1.35.arm64_sonoma.bottle.1.tar.gz
==> Caveats
GNU "tar" has been installed as "gtar".
If you need to use it as "tar", you can add a "gnubin" directory
to your PATH from your bashrc like:

    PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"
==> Summary
🍺  /opt/homebrew/Cellar/gnu-tar/1.35: 17 files, 1.8MB
==> Running `brew cleanup gnu-tar`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Then:

we will still facing issues with the mktemp -td

$ make demo-update
stat /Users/camilam/go/src/github/operator-framework/operator-controller/catalogd/internal/version: directory not found
hack/scripts/generate-asciidemo.sh
hack/scripts/generate-asciidemo.sh: line 40: [: /var/folders/n4/j272tr6d7hq63mf7_skv6zr80000gn/T/d.PREDMYraHv: binary operator expected
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5481  100  5481    0     0  87177      0 --:--:-- --:--:-- --:--:-- 88403
curl: (6) Could not resolve host: generate-asciidemo.UzLDl
chmod: generate-asciidemo.UzLDl/asciinema-rec_script: Not a directory
/var/folders/n4/j272tr6d7hq63mf7_skv6zr80000gn/T/d.PREDMYraHv: line 155: generate-asciidemo.UzLDl/asciinema-rec_script: Not a directory
asciinema: /Users/camilam/go/src/github/operator-framework/operator-controller/catalogd/hack/scripts/demo-script.sh already exists, aborting
asciinema: use --overwrite option if you want to overwrite existing recording
asciinema: use --append option if you want to append to existing recording
usage: asciinema [-h] [--version] {rec,play,cat,upload,auth} ...
asciinema: error: unrecognized arguments: generate-asciidemo.UzLDl/catalogd-demo.cast
hack/scripts/generate-asciidemo.sh: line 17: [: /var/folders/n4/j272tr6d7hq63mf7_skv6zr80000gn/T/d.PREDMYraHv: binary operator expected
make: *** [demo-update] Error 2

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the issue is because the docs don't also brew install coreutils which is where the updated mktemp binary lives.
If we updated the docs, we wouldn't need this PR.

if [ ! -d ${WKDIR} ]
then
echo "unable to create temporary workspace"
Expand Down
Loading