From d52e08a53ef653aead4a50aac50635e09d3985a6 Mon Sep 17 00:00:00 2001 From: commit111 Date: Mon, 18 Nov 2024 08:57:35 -0800 Subject: [PATCH 1/3] fix bash install to use eval --- .github/workflows/check-sample.yml | 4 ++-- .../app/pages/getting-started/installing.mdx | 2 +- samples/vllm/ui/src/app/docs.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-sample.yml b/.github/workflows/check-sample.yml index 5c956f7b..b88b4712 100644 --- a/.github/workflows/check-sample.yml +++ b/.github/workflows/check-sample.yml @@ -21,7 +21,7 @@ jobs: - name: Run Checks id: checks run: | - . <(curl -Ls https://s.defang.io/install) + eval "$(curl -Ls https://s.defang.io/install)" ./scripts/check-sample-files.sh > checklist.txt ./scripts/check-modified-samples.sh > modified.txt echo "@@ MODIFIED @@" @@ -31,7 +31,7 @@ jobs: # once we figure out how to prevent it from erroring on warnings. # - name: Validate Compose Files with Defang CLI # run: | - # . <(curl -Ls https://s.defang.io/install) + # eval "$(curl -Ls https://s.defang.io/install)" # cat modified.txt | xargs -n1 defang compose config -C > /dev/null - name: Add checklist to PR description diff --git a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx index 15380048..6bb10c54 100644 --- a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx +++ b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx @@ -17,7 +17,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -. <(curl -Ls https://s.defang.io/install) +eval "$(curl -Ls https://s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. diff --git a/samples/vllm/ui/src/app/docs.md b/samples/vllm/ui/src/app/docs.md index 137ca109..3dda4e67 100644 --- a/samples/vllm/ui/src/app/docs.md +++ b/samples/vllm/ui/src/app/docs.md @@ -107,7 +107,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -. <(curl -Ls https://s.defang.io/install) +eval "$(curl -Ls https://s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. From 20c5696077cc36705a127ffa09b26b167ade5f4b Mon Sep 17 00:00:00 2001 From: commit111 Date: Wed, 20 Nov 2024 09:52:16 -0800 Subject: [PATCH 2/3] added f and S flags to curl --- .github/workflows/check-sample.yml | 4 ++-- .../app/pages/getting-started/installing.mdx | 2 +- samples/vllm/ui/src/app/docs.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-sample.yml b/.github/workflows/check-sample.yml index b88b4712..d00f694d 100644 --- a/.github/workflows/check-sample.yml +++ b/.github/workflows/check-sample.yml @@ -21,7 +21,7 @@ jobs: - name: Run Checks id: checks run: | - eval "$(curl -Ls https://s.defang.io/install)" + eval "$(curl -fsSL https://s.defang.io/install)" ./scripts/check-sample-files.sh > checklist.txt ./scripts/check-modified-samples.sh > modified.txt echo "@@ MODIFIED @@" @@ -31,7 +31,7 @@ jobs: # once we figure out how to prevent it from erroring on warnings. # - name: Validate Compose Files with Defang CLI # run: | - # eval "$(curl -Ls https://s.defang.io/install)" + # eval "$(curl -fsSL https://s.defang.io/install)" # cat modified.txt | xargs -n1 defang compose config -C > /dev/null - name: Add checklist to PR description diff --git a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx index 6bb10c54..7fda85ed 100644 --- a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx +++ b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx @@ -17,7 +17,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -eval "$(curl -Ls https://s.defang.io/install)" +eval "$(curl -fsSL https://s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. diff --git a/samples/vllm/ui/src/app/docs.md b/samples/vllm/ui/src/app/docs.md index 3dda4e67..28d5ea2a 100644 --- a/samples/vllm/ui/src/app/docs.md +++ b/samples/vllm/ui/src/app/docs.md @@ -107,7 +107,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -eval "$(curl -Ls https://s.defang.io/install)" +eval "$(curl -fsSL https://s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. From 9396cd7b7714b920229febc441412b890e87ae2e Mon Sep 17 00:00:00 2001 From: commit111 Date: Wed, 20 Nov 2024 12:02:21 -0800 Subject: [PATCH 3/3] remove http from url in curl --- .github/workflows/check-sample.yml | 4 ++-- .../app/pages/getting-started/installing.mdx | 2 +- samples/vllm/ui/src/app/docs.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-sample.yml b/.github/workflows/check-sample.yml index d00f694d..37daa9c8 100644 --- a/.github/workflows/check-sample.yml +++ b/.github/workflows/check-sample.yml @@ -21,7 +21,7 @@ jobs: - name: Run Checks id: checks run: | - eval "$(curl -fsSL https://s.defang.io/install)" + eval "$(curl -fsSL s.defang.io/install)" ./scripts/check-sample-files.sh > checklist.txt ./scripts/check-modified-samples.sh > modified.txt echo "@@ MODIFIED @@" @@ -31,7 +31,7 @@ jobs: # once we figure out how to prevent it from erroring on warnings. # - name: Validate Compose Files with Defang CLI # run: | - # eval "$(curl -fsSL https://s.defang.io/install)" + # eval "$(curl -fsSL s.defang.io/install)" # cat modified.txt | xargs -n1 defang compose config -C > /dev/null - name: Add checklist to PR description diff --git a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx index 7fda85ed..1ce41dc9 100644 --- a/samples/nextjs-documentation/app/pages/getting-started/installing.mdx +++ b/samples/nextjs-documentation/app/pages/getting-started/installing.mdx @@ -17,7 +17,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -eval "$(curl -fsSL https://s.defang.io/install)" +eval "$(curl -fsSL s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. diff --git a/samples/vllm/ui/src/app/docs.md b/samples/vllm/ui/src/app/docs.md index 28d5ea2a..574326d6 100644 --- a/samples/vllm/ui/src/app/docs.md +++ b/samples/vllm/ui/src/app/docs.md @@ -107,7 +107,7 @@ brew install defang-io/defang/defang You can install the Defang CLI using a bash script. Just run the following command in your terminal: ```bash -eval "$(curl -fsSL https://s.defang.io/install)" +eval "$(curl -fsSL s.defang.io/install)" ``` The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script.