diff --git a/.github/workflows/pr-posix-script-setup-version-tests.yml b/.github/workflows/pr-posix-script-setup-version-tests.yml index 3cd51ee..3120114 100644 --- a/.github/workflows/pr-posix-script-setup-version-tests.yml +++ b/.github/workflows/pr-posix-script-setup-version-tests.yml @@ -1,12 +1,11 @@ -name: POSIX Script Setup Version Logic Tests +name: POSIX Script Slim URL Logic Tests on: pull_request: jobs: - # Test that setup is NOT disabled for v3.24+ (where lando setup exists) - # This test will FAIL on main due to inverted SLIM_SETUPY logic - setup-enabled-for-v324-plus: + # v3.24+ should NOT append -slim to URL (unified binary) + no-slim-suffix-for-v324-plus: runs-on: ${{ matrix.os }} env: LANDO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -22,24 +21,21 @@ jobs: os: macos-14 steps: - name: Checkout code - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Run setup-lando with debug for v3.24+ - id: setup + uses: actions/checkout@v4 + - name: Verify no -slim suffix for v3.24+ shell: bash run: | ./setup-lando.sh --version=${{ matrix.version }} --debug 2>&1 | tee setup-output.log - if grep -q "disabled autosetup" setup-output.log; then - echo "::error::BUG: Setup was incorrectly disabled for v3.24+" + if grep -q "autoslimin url" setup-output.log; then + echo "::error::BUG: -slim suffix incorrectly added for v3.24+" exit 1 fi - name: Verify lando installed shell: bash run: lando version - # Test that setup IS disabled for v3.23.x and below (where lando setup doesn't exist) - setup-disabled-for-pre-v324: + # pre-v3.24 SHOULD append -slim to URL (separate slim/fat builds existed) + slim-suffix-for-pre-v324: runs-on: ${{ matrix.os }} env: LANDO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -53,16 +49,13 @@ jobs: os: macos-14 steps: - name: Checkout code - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Run setup-lando with debug for pre-v3.24 - id: setup + uses: actions/checkout@v4 + - name: Verify -slim suffix added for pre-v3.24 shell: bash run: | ./setup-lando.sh --version=${{ matrix.version }} --debug 2>&1 | tee setup-output.log - if ! grep -q "disabled autosetup" setup-output.log; then - echo "::error::BUG: Setup was NOT disabled for pre-v3.24" + if ! grep -q "autoslimin url" setup-output.log; then + echo "::error::BUG: -slim suffix NOT added for pre-v3.24" exit 1 fi - name: Verify lando installed diff --git a/setup-lando.sh b/setup-lando.sh index a325f60..49dadc3 100755 --- a/setup-lando.sh +++ b/setup-lando.sh @@ -594,10 +594,10 @@ else fi # fatty slim -SLIM_SETUPY=$(version_compare "3.23.0" "$SVERSION" && echo '1' || echo '0') +SLIM_SETUPY=$(version_compare "$SVERSION" "3.24" && echo '1' || echo '0') # autoslim all v3 urls by default -if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && [[ $SLIM_SETUPY == '1' ]]; then +if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && [[ $SLIM_SETUPY == '0' ]]; then URL="${URL}-slim" HRV="$VERSION-slim" debug "autoslimin url for lando 3 to $URL"