From f1fd611136ca3a2249a7f1bc50d0c5491fca53e3 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 29 Jul 2026 14:40:23 +1000 Subject: [PATCH] Fixed v2 binary build using '.vortex/installer' path removed on '2.x'. --- .github/workflows/vortex-release.yml | 31 ++++++++++++++------------ .github/workflows/vortex-test-docs.yml | 16 +++++++------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/vortex-release.yml b/.github/workflows/vortex-release.yml index 45c94d1a5..1d9027699 100644 --- a/.github/workflows/vortex-release.yml +++ b/.github/workflows/vortex-release.yml @@ -99,10 +99,11 @@ jobs: path: .vortex/installer/build/installer.phar if-no-files-found: error - # Build the other major's installer from its '{N}.x' branch so it is - # published alongside the current one. Checked out into a separate path so - # the current installer build above is untouched. Mirrors how the docs job - # pulls the other major's branch content. + # Build the other major from its '{N}.x' branch so it is published + # alongside the current one. Checked out into a separate path so the + # build above is untouched. Mirrors how the docs job pulls the other + # major's branch content. Each major builds whatever it ships - the + # installer above, the CLI here - so this leg keeps its own paths. - name: Checkout v${{ env.OTHER_MAJOR }} branch uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: @@ -110,19 +111,19 @@ jobs: path: vortex-v${{ env.OTHER_MAJOR }} persist-credentials: false - - name: Build v${{ env.OTHER_MAJOR }} installer + - name: Build v${{ env.OTHER_MAJOR }} binary run: | composer install - sed -i "s/\"vortex-installer-version\": \"development\"/\"vortex-installer-version\": \"${OTHER_MAJOR}.x-dev\"/g" box.json + sed -i "s/\"vortex-cli-version\": \"development\"/\"vortex-cli-version\": \"${OTHER_MAJOR}.x-dev\"/g" box.json composer build - ./build/installer.phar --version - working-directory: vortex-v${{ env.OTHER_MAJOR }}/.vortex/installer + ./.build/vortex.phar --version + working-directory: vortex-v${{ env.OTHER_MAJOR }}/.vortex/cli - - name: Upload v${{ env.OTHER_MAJOR }} installer artifact + - name: Upload v${{ env.OTHER_MAJOR }} artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: vortex-installer-v${{ env.OTHER_MAJOR }} - path: vortex-v${{ env.OTHER_MAJOR }}/.vortex/installer/build/installer.phar + path: vortex-v${{ env.OTHER_MAJOR }}/.vortex/cli/.build/vortex.phar if-no-files-found: error vortex-release-docs: @@ -183,20 +184,22 @@ jobs: name: vortex-installer-v2 path: installer-v2 - # Publish both installers. '/v1/install' and '/v2/install' are the stable + # Publish both majors. '/v1/install' and '/v2/install' are the stable # per-major pins, always built from each major's own source. The bare # '/install' is a copy of the current major's pin, selected by the # 'VORTEX_CURRENT_MAJOR' repository variable (default 1) - bumping that one # variable is the only action needed to promote a new major. - - name: Copy installers to docs + - name: Copy binaries to docs run: | case "${CURRENT_MAJOR}" in 1|2) ;; *) echo "Invalid VORTEX_CURRENT_MAJOR='${CURRENT_MAJOR}'. Expected 1 or 2."; exit 1 ;; esac mkdir -p ../.vortex/docs/static/v1 ../.vortex/docs/static/v2 - cp ../installer-v1/installer.phar ../.vortex/docs/static/v1/install - cp ../installer-v2/installer.phar ../.vortex/docs/static/v2/install + # Each artifact holds exactly one PHAR, but its filename depends on + # what that major ships, so it is matched rather than named. + cp ../installer-v1/*.phar ../.vortex/docs/static/v1/install + cp ../installer-v2/*.phar ../.vortex/docs/static/v2/install cp "../.vortex/docs/static/v${CURRENT_MAJOR}/install" ../.vortex/docs/static/install php ../.vortex/docs/static/install --version diff --git a/.github/workflows/vortex-test-docs.yml b/.github/workflows/vortex-test-docs.yml index be39e07c5..111464984 100644 --- a/.github/workflows/vortex-test-docs.yml +++ b/.github/workflows/vortex-test-docs.yml @@ -107,11 +107,11 @@ jobs: git -C "${{ github.workspace }}" checkout "origin/${OTHER_MAJOR}.x" -- .vortex/docs/content || { echo "Failed to check out content from ${OTHER_MAJOR}.x."; exit 1; } working-directory: '${{ github.workspace }}/.vortex/docs' - # On the main deploy, publish both installers to match the multi-version + # On the main deploy, publish both majors to match the multi-version # docs: '/v1/install' and '/v2/install' are the stable per-major pins and # the bare '/install' is a copy of the current major's pin (the # 'VORTEX_CURRENT_MAJOR' repository variable, default 1). The downloaded - # installer above is the current major (built from 'main'); the other + # binary above is the current major (built from 'main'); the other # major is built from its '{N}.x' branch. Mirrors 'vortex-release.yml'. - name: Checkout v${{ env.OTHER_MAJOR }} branch if: github.event.workflow_run.head_branch == 'main' @@ -121,19 +121,21 @@ jobs: path: vortex-v${{ env.OTHER_MAJOR }} persist-credentials: false - - name: Build and publish v${{ env.OTHER_MAJOR }} installer + # Each major builds whatever it ships - the installer here, the CLI on + # '2.x' - so this leg keeps its own paths, box token and PHAR name. + - name: Build and publish v${{ env.OTHER_MAJOR }} binary if: github.event.workflow_run.head_branch == 'main' run: | case "${CURRENT_MAJOR}" in 1|2) ;; *) echo "Invalid VORTEX_CURRENT_MAJOR='${CURRENT_MAJOR}'. Expected 1 or 2."; exit 1 ;; esac - composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/installer" install - sed -i "s/\"vortex-installer-version\": \"development\"/\"vortex-installer-version\": \"${OTHER_MAJOR}.x-dev\"/g" "vortex-v${OTHER_MAJOR}/.vortex/installer/box.json" - composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/installer" build + composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/cli" install + sed -i "s/\"vortex-cli-version\": \"development\"/\"vortex-cli-version\": \"${OTHER_MAJOR}.x-dev\"/g" "vortex-v${OTHER_MAJOR}/.vortex/cli/box.json" + composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/cli" build mkdir -p .vortex/docs/static/v1 .vortex/docs/static/v2 cp .vortex/docs/static/install ".vortex/docs/static/v${CURRENT_MAJOR}/install" - cp "vortex-v${OTHER_MAJOR}/.vortex/installer/build/installer.phar" ".vortex/docs/static/v${OTHER_MAJOR}/install" + cp "vortex-v${OTHER_MAJOR}/.vortex/cli/.build/vortex.phar" ".vortex/docs/static/v${OTHER_MAJOR}/install" cp ".vortex/docs/static/v${CURRENT_MAJOR}/install" .vortex/docs/static/install - name: Build documentation site