From 36b30ab9583aaad5114fa2e7d2c1123bb396cd2b Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 14:58:59 +0200 Subject: [PATCH 01/14] Test install script --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df0f1a27c..ac88e153b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,3 +83,23 @@ jobs: - name: Publish AOT run: dotnet run --project build -c release -- publishbinaries + + install-script: + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} - ${{ matrix.command }} + strategy: + matrix: + include: + - os: ubuntu-latest + command: ./install.sh + - os: macos-latest + command: ./install.sh + - os: windows-latest + command: .\install.sh + - os: windows-latest + command: .\install.ps1 + shell: pwsh + steps: + - uses: actions/checkout@v4 + - run: ${{ matrix.command }} + shell: ${{ matrix.shell }} From 99d02cb0272a12367257a160383000bb0e5155d8 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:00:55 +0200 Subject: [PATCH 02/14] test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac88e153b..b61bb1668 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,10 +92,10 @@ jobs: include: - os: ubuntu-latest command: ./install.sh + shell: sh - os: macos-latest command: ./install.sh - - os: windows-latest - command: .\install.sh + shell: sh - os: windows-latest command: .\install.ps1 shell: pwsh From e7d0d440f37d8ef12b35d3f813cba2d0d6a28661 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:03:55 +0200 Subject: [PATCH 03/14] test --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b61bb1668..41a1558a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,14 +92,11 @@ jobs: include: - os: ubuntu-latest command: ./install.sh - shell: sh - os: macos-latest command: ./install.sh - shell: sh - os: windows-latest command: .\install.ps1 - shell: pwsh steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} - shell: ${{ matrix.shell }} + shell: ${{ startsWith(matrix.os, 'windows') && 'pwsh' || 'sh' }} From 68a10a763f38717446492c23f310aa91075b3c22 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:06:36 +0200 Subject: [PATCH 04/14] test --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a1558a9..1b6ac2f7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,4 +99,3 @@ jobs: steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} - shell: ${{ startsWith(matrix.os, 'windows') && 'pwsh' || 'sh' }} From 70cd796d6cd41ef5c35a886df7690fd2a6aab612 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:08:29 +0200 Subject: [PATCH 05/14] test --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b6ac2f7a..ace77dd09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,11 +91,11 @@ jobs: matrix: include: - os: ubuntu-latest - command: ./install.sh + command: curl -sL https://ela.st/docs-builder-install | sh - os: macos-latest - command: ./install.sh + command: curl -sL https://ela.st/docs-builder-install | sh - os: windows-latest - command: .\install.ps1 + command: iex (New-Object System.Net.WebClient).DownloadString('https://ela.st/docs-builder-install-win') steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} From 7b4d643a8f13b875b805f57b627414ef8092a73d Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:20:34 +0200 Subject: [PATCH 06/14] test --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ace77dd09..9a682bc31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} - ${{ matrix.command }} strategy: + fail-fast: false matrix: include: - os: ubuntu-latest From 4899ef31d5bce63da667f2d04abe99ec36884d3e Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:22:43 +0200 Subject: [PATCH 07/14] test --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a682bc31..339c3dbe0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,3 +100,4 @@ jobs: steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} + - run: docs-builder --help From 332429a2edfc1904f036703d291b69116f7c820c Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:30:19 +0200 Subject: [PATCH 08/14] test --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 163ce3279..f1dae9798 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ -#!/bin/sh -set -euo pipefail +#!/usr/bin/env bash +set -eu pipefail # Determine OS type and architecture OS=$(uname -s | tr '[:upper:]' '[:lower:]') @@ -36,7 +36,7 @@ fi # Check if docs-builder already exists, but handle non-interactive shells if [ -f "$INSTALL_DIR/docs-builder" ]; then echo "docs-builder is already installed." - + # Check if script is running interactively (has a TTY) if [ -t 0 ]; then # Running interactively, can prompt for input @@ -88,4 +88,4 @@ fi rm -f "$BINARY" echo "docs-builder has been installed successfully and is available in your PATH." -echo "You can run 'docs-builder --help' to see available commands." \ No newline at end of file +echo "You can run 'docs-builder --help' to see available commands." From 77da7a1ab631161a4da9b8eedb9d238c27c6eb71 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:43:14 +0200 Subject: [PATCH 09/14] test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 339c3dbe0..ae6ca856d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: matrix: include: - os: ubuntu-latest - command: curl -sL https://ela.st/docs-builder-install | sh + command: sudo curl -sL https://ela.st/docs-builder-install | sh - os: macos-latest command: curl -sL https://ela.st/docs-builder-install | sh - os: windows-latest From 45ef67d5927250ca3f42c259cc9dce8302a33e79 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:48:35 +0200 Subject: [PATCH 10/14] test --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae6ca856d..cfa3b6957 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: matrix: include: - os: ubuntu-latest - command: sudo curl -sL https://ela.st/docs-builder-install | sh + command: curl -sL https://ela.st/docs-builder-install | sh - os: macos-latest command: curl -sL https://ela.st/docs-builder-install | sh - os: windows-latest @@ -100,4 +100,5 @@ jobs: steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} + shell: bash - run: docs-builder --help From 4ea375679163beaae036237abe877faf15ed939d Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:53:46 +0200 Subject: [PATCH 11/14] test --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfa3b6957..2f47d463f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,18 +87,20 @@ jobs: install-script: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} - ${{ matrix.command }} + env: + INSTALL_SCRIPT: https://raw.githubusercontent.com/elastic/docs-builder/${{ github.sha }}/install.sh + INSTALL_SCRIPT_PWSH: https://raw.githubusercontent.com/elastic/docs-builder/${{ github.sha }}/install.ps1 strategy: fail-fast: false matrix: include: - os: ubuntu-latest - command: curl -sL https://ela.st/docs-builder-install | sh + command: curl -sL ${{ env.INSTALL_SCRIPT }} | sh - os: macos-latest - command: curl -sL https://ela.st/docs-builder-install | sh + command: curl -sL ${{ env.INSTALL_SCRIPT }} | sh - os: windows-latest command: iex (New-Object System.Net.WebClient).DownloadString('https://ela.st/docs-builder-install-win') steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} - shell: bash - run: docs-builder --help From 4ab9fc3ebe071c3ad17b1cc7155837a390b06b00 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:55:49 +0200 Subject: [PATCH 12/14] test --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f47d463f..254799af5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,11 +95,11 @@ jobs: matrix: include: - os: ubuntu-latest - command: curl -sL ${{ env.INSTALL_SCRIPT }} | sh + command: curl -sL https://raw.githubusercontent.com/elastic/docs-builder/${{ github.sha }}/install.sh | sh - os: macos-latest - command: curl -sL ${{ env.INSTALL_SCRIPT }} | sh + command: curl -sL https://raw.githubusercontent.com/elastic/docs-builder/${{ github.sha }}/install.sh | sh - os: windows-latest - command: iex (New-Object System.Net.WebClient).DownloadString('https://ela.st/docs-builder-install-win') + command: iex (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/elastic/docs-builder/${{ github.sha }}/install.ps1') steps: - uses: actions/checkout@v4 - run: ${{ matrix.command }} From bea3e48a8531b37bac97320e5b8058bd9774c0be Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:58:47 +0200 Subject: [PATCH 13/14] test --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f1dae9798..ed863de32 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ ARCH=$(uname -m) # Map architecture naming if [ "$ARCH" = "x86_64" ]; then - ARCH="amd64" + ARCH="x64" elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then ARCH="arm64" fi From b68ae075ccaf279c88e7e0a67c08439400f7440f Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Mon, 26 May 2025 15:59:20 +0200 Subject: [PATCH 14/14] fix --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ed863de32..07da436e4 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eu pipefail +set -eu # Determine OS type and architecture OS=$(uname -s | tr '[:upper:]' '[:lower:]')