From 0bc4e62e1689f5ccc398e8920aed88e0e742ccd7 Mon Sep 17 00:00:00 2001 From: Jerico Aragon Date: Thu, 7 May 2026 11:55:39 +0800 Subject: [PATCH 1/2] Update branch name and version resolution --- .github/workflows/module-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index 7e96f89..f7442f1 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -82,7 +82,7 @@ jobs: if [[ "$BRANCH_NAME" =~ ^(v[0-9]{2}-branch)$ ]]; then BASE_BRANCH="${BASH_REMATCH[1]}" else - BASE_BRANCH="dev-master" + BASE_BRANCH="master" fi echo "base-branch=$BASE_BRANCH" >> "$GITHUB_OUTPUT" echo "Branch under test: $BRANCH_NAME" @@ -118,8 +118,13 @@ jobs: # Inject the package under test, aliased so composer accepts the dev branch # against any existing version constraint. Mirrors travis/module.yml. - INSTALLED_VERSION=$(jq -r ".packages[] | select (.name==\"$ALTIS_PACKAGE\") | .version" composer.lock) - ALIAS_VERSION=$(printf '%s' "$INSTALLED_VERSION" | sed -e '/^dev/q;s/$/9/') + # Search both packages and packages-dev (e.g. altis/local-server is require-dev in skeleton). + INSTALLED_VERSION=$(jq -r '(.packages[], .packages-dev[]) | select(.name==$pkg) | .version' --arg pkg "$ALTIS_PACKAGE" composer.lock | head -1) + if [[ -z "$INSTALLED_VERSION" || "$INSTALLED_VERSION" =~ ^dev- ]]; then + ALIAS_VERSION="9999.9.9" + else + ALIAS_VERSION="${INSTALLED_VERSION}9" + fi composer require -W "$ALTIS_PACKAGE:dev-${BRANCH_NAME} as ${ALIAS_VERSION}" - name: Generate WP salts and load.php guard From 28a2752b8765e4cfd5fd69e024db0a9dc34759a3 Mon Sep 17 00:00:00 2001 From: Jerico Aragon Date: Thu, 7 May 2026 12:11:47 +0800 Subject: [PATCH 2/2] Fix jq --- .github/workflows/module-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index f7442f1..0f509c1 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -119,7 +119,7 @@ jobs: # Inject the package under test, aliased so composer accepts the dev branch # against any existing version constraint. Mirrors travis/module.yml. # Search both packages and packages-dev (e.g. altis/local-server is require-dev in skeleton). - INSTALLED_VERSION=$(jq -r '(.packages[], .packages-dev[]) | select(.name==$pkg) | .version' --arg pkg "$ALTIS_PACKAGE" composer.lock | head -1) + INSTALLED_VERSION=$(jq -r '(.packages[], .["packages-dev"][]) | select(.name==$pkg) | .version' --arg pkg "$ALTIS_PACKAGE" composer.lock | head -1) if [[ -z "$INSTALLED_VERSION" || "$INSTALLED_VERSION" =~ ^dev- ]]; then ALIAS_VERSION="9999.9.9" else