From f42791464a09f2d8b46a8a8ee0b9c7ab553b04da Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 16 Apr 2026 19:12:25 -0500 Subject: [PATCH] Migrate workflow templates to reference MokoStandards-API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All templates now clone MokoStandards-API.git (this repo) instead of MokoStandards.git for CLI tools. Path mappings: - /tmp/mokostandards → /tmp/mokostandards-api - /api/cli/ → /cli/ - /api/deploy/ → /deploy/ - /api/maintenance/ → /maintenance/ Co-Authored-By: Claude Opus 4.6 (1M context) --- .../dolibarr/auto-release.yml.template | 10 +++---- .../dolibarr/ci-dolibarr.yml.template | 28 +++++++++---------- .../joomla/auto-release.yml.template | 10 +++---- .../workflows/joomla/ci-joomla.yml.template | 2 +- .../joomla/deploy-manual.yml.template | 14 +++++----- .../joomla/update-server.yml.template | 22 +++++++-------- .../shared/auto-release.yml.template | 10 +++---- .../workflows/shared/deploy-demo.yml.template | 18 ++++++------ .../workflows/shared/deploy-dev.yml.template | 20 ++++++------- .../workflows/shared/deploy-rs.yml.template | 14 +++++----- .../shared/sync-version-on-merge.yml.template | 10 +++---- 11 files changed, 79 insertions(+), 79 deletions(-) diff --git a/templates/workflows/dolibarr/auto-release.yml.template b/templates/workflows/dolibarr/auto-release.yml.template index dfce2a0..4fe0edf 100644 --- a/templates/workflows/dolibarr/auto-release.yml.template +++ b/templates/workflows/dolibarr/auto-release.yml.template @@ -72,15 +72,15 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet # -- STEP 1: Read version ----------------------------------------------- - name: "Step 1: Read version from README.md" id: version run: | - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null) + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null) if [ -z "$VERSION" ]; then echo "No VERSION in README.md — skipping release" echo "skip=true" >> "$GITHUB_OUTPUT" @@ -245,7 +245,7 @@ jobs: steps.check.outputs.already_released != 'true' run: | VERSION="${{ steps.version.outputs.version }}" - php /tmp/mokostandards/api/cli/version_set_platform.php \ + php /tmp/mokostandards-api/cli/version_set_platform.php \ --path . --version "$VERSION" --branch main # -- STEP 4: Update version badges ---------------------------------------- @@ -320,7 +320,7 @@ jobs: BRANCH="${{ steps.version.outputs.branch }}" MAJOR="${{ steps.version.outputs.major }}" - NOTES=$(php /tmp/mokostandards/api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) + NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) [ -z "$NOTES" ] && NOTES="Release ${VERSION}" echo "$NOTES" > /tmp/release_notes.md diff --git a/templates/workflows/dolibarr/ci-dolibarr.yml.template b/templates/workflows/dolibarr/ci-dolibarr.yml.template index bb5c1f0..926e6df 100644 --- a/templates/workflows/dolibarr/ci-dolibarr.yml.template +++ b/templates/workflows/dolibarr/ci-dolibarr.yml.template @@ -54,7 +54,7 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards + /tmp/mokostandards-api - name: Install dependencies env: @@ -98,7 +98,7 @@ jobs: EXIT=${PIPESTATUS[0]} else echo "validate-module not in vendor/bin — running from MokoStandards" - php /tmp/mokostandards/bin/validate-module --path . 2>&1 | tee /tmp/validate.log + php /tmp/mokostandards-api/bin/validate-module --path . 2>&1 | tee /tmp/validate.log EXIT=${PIPESTATUS[0]} fi echo "### Module Validation" >> $GITHUB_STEP_SUMMARY @@ -117,15 +117,15 @@ jobs: if [ -f "phpcs.xml" ]; then if [ -x "vendor/bin/phpcs" ]; then vendor/bin/phpcs --standard=phpcs.xml src/ htdocs/ || true - elif [ -x "/tmp/mokostandards/vendor/bin/phpcs" ]; then - /tmp/mokostandards/vendor/bin/phpcs --standard=phpcs.xml src/ htdocs/ || true + elif [ -x "/tmp/mokostandards-api/vendor/bin/phpcs" ]; then + /tmp/mokostandards-api/vendor/bin/phpcs --standard=phpcs.xml src/ htdocs/ || true fi else STANDARD="" if [ -f "vendor/mokoconsulting-tech/enterprise/phpcs.xml" ]; then STANDARD="vendor/mokoconsulting-tech/enterprise/phpcs.xml" - elif [ -f "/tmp/mokostandards/phpcs.xml" ]; then - STANDARD="/tmp/mokostandards/phpcs.xml" + elif [ -f "/tmp/mokostandards-api/phpcs.xml" ]; then + STANDARD="/tmp/mokostandards-api/phpcs.xml" fi if [ -n "$STANDARD" ]; then DIRS="" @@ -135,8 +135,8 @@ jobs: if [ -n "$DIRS" ]; then if [ -x "vendor/bin/phpcs" ]; then vendor/bin/phpcs --standard="$STANDARD" $DIRS || true - elif [ -x "/tmp/mokostandards/vendor/bin/phpcs" ]; then - /tmp/mokostandards/vendor/bin/phpcs --standard="$STANDARD" $DIRS || true + elif [ -x "/tmp/mokostandards-api/vendor/bin/phpcs" ]; then + /tmp/mokostandards-api/vendor/bin/phpcs --standard="$STANDARD" $DIRS || true fi fi fi @@ -155,21 +155,21 @@ jobs: if [ -f "phpstan.neon" ]; then if [ -x "vendor/bin/phpstan" ]; then vendor/bin/phpstan analyse -c phpstan.neon $DIRS || true - elif [ -x "/tmp/mokostandards/vendor/bin/phpstan" ]; then - /tmp/mokostandards/vendor/bin/phpstan analyse -c phpstan.neon $DIRS || true + elif [ -x "/tmp/mokostandards-api/vendor/bin/phpstan" ]; then + /tmp/mokostandards-api/vendor/bin/phpstan analyse -c phpstan.neon $DIRS || true fi else CONFIG="" if [ -f "vendor/mokoconsulting-tech/enterprise/phpstan.neon" ]; then CONFIG="vendor/mokoconsulting-tech/enterprise/phpstan.neon" - elif [ -f "/tmp/mokostandards/phpstan.neon" ]; then - CONFIG="/tmp/mokostandards/phpstan.neon" + elif [ -f "/tmp/mokostandards-api/phpstan.neon" ]; then + CONFIG="/tmp/mokostandards-api/phpstan.neon" fi if [ -n "$CONFIG" ]; then if [ -x "vendor/bin/phpstan" ]; then vendor/bin/phpstan analyse -c "$CONFIG" $DIRS || true - elif [ -x "/tmp/mokostandards/vendor/bin/phpstan" ]; then - /tmp/mokostandards/vendor/bin/phpstan analyse -c "$CONFIG" $DIRS || true + elif [ -x "/tmp/mokostandards-api/vendor/bin/phpstan" ]; then + /tmp/mokostandards-api/vendor/bin/phpstan analyse -c "$CONFIG" $DIRS || true fi fi fi diff --git a/templates/workflows/joomla/auto-release.yml.template b/templates/workflows/joomla/auto-release.yml.template index 5b9b319..ef2a2f2 100644 --- a/templates/workflows/joomla/auto-release.yml.template +++ b/templates/workflows/joomla/auto-release.yml.template @@ -73,15 +73,15 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet # -- STEP 1: Read version ----------------------------------------------- - name: "Step 1: Read version from README.md" id: version run: | - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null) + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null) if [ -z "$VERSION" ]; then echo "No VERSION in README.md — skipping release" echo "skip=true" >> "$GITHUB_OUTPUT" @@ -245,7 +245,7 @@ jobs: steps.check.outputs.already_released != 'true' run: | VERSION="${{ steps.version.outputs.version }}" - php /tmp/mokostandards/api/cli/version_set_platform.php \ + php /tmp/mokostandards-api/cli/version_set_platform.php \ --path . --version "$VERSION" --branch main # -- STEP 4: Update version badges ---------------------------------------- @@ -424,7 +424,7 @@ jobs: BRANCH="${{ steps.version.outputs.branch }}" MAJOR="${{ steps.version.outputs.major }}" - NOTES=$(php /tmp/mokostandards/api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) + NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) [ -z "$NOTES" ] && NOTES="Release ${VERSION}" echo "$NOTES" > /tmp/release_notes.md diff --git a/templates/workflows/joomla/ci-joomla.yml.template b/templates/workflows/joomla/ci-joomla.yml.template index 8a0b4fe..348cdde 100644 --- a/templates/workflows/joomla/ci-joomla.yml.template +++ b/templates/workflows/joomla/ci-joomla.yml.template @@ -54,7 +54,7 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards + /tmp/mokostandards-api - name: Install dependencies env: diff --git a/templates/workflows/joomla/deploy-manual.yml.template b/templates/workflows/joomla/deploy-manual.yml.template index a7c4b35..a57be26 100644 --- a/templates/workflows/joomla/deploy-manual.yml.template +++ b/templates/workflows/joomla/deploy-manual.yml.template @@ -55,9 +55,9 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards 2>/dev/null || true - if [ -d "/tmp/mokostandards" ] && [ -f "/tmp/mokostandards/composer.json" ]; then - cd /tmp/mokostandards && composer install --no-dev --no-interaction --quiet 2>/dev/null || true + /tmp/mokostandards-api 2>/dev/null || true + if [ -d "/tmp/mokostandards-api" ] && [ -f "/tmp/mokostandards-api/composer.json" ]; then + cd /tmp/mokostandards-api && composer install --no-dev --no-interaction --quiet 2>/dev/null || true fi - name: Check FTP configuration @@ -109,11 +109,11 @@ jobs: DEPLOY_ARGS=(--path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json) [ "${{ inputs.clear_remote }}" = "true" ] && DEPLOY_ARGS+=(--clear-remote) - PLATFORM=$(php /tmp/mokostandards/api/cli/platform_detect.php --path . 2>/dev/null || true) - if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards/api/deploy/deploy-joomla.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" else - php /tmp/mokostandards/api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" + php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" fi rm -f /tmp/deploy_key /tmp/sftp-config.json diff --git a/templates/workflows/joomla/update-server.yml.template b/templates/workflows/joomla/update-server.yml.template index 44cf621..7225722 100644 --- a/templates/workflows/joomla/update-server.yml.template +++ b/templates/workflows/joomla/update-server.yml.template @@ -73,24 +73,24 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards 2>/dev/null || true - if [ -d "/tmp/mokostandards" ] && [ -f "/tmp/mokostandards/composer.json" ]; then - cd /tmp/mokostandards && composer install --no-dev --no-interaction --quiet 2>/dev/null || true + /tmp/mokostandards-api 2>/dev/null || true + if [ -d "/tmp/mokostandards-api" ] && [ -f "/tmp/mokostandards-api/composer.json" ]; then + cd /tmp/mokostandards-api && composer install --no-dev --no-interaction --quiet 2>/dev/null || true fi - name: Generate updates.xml entry run: | BRANCH="${{ github.ref_name }}" REPO="${{ github.repository }}" - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null || echo "0.0.0") + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "0.0.0") # Auto-bump patch on alpha/beta/rc branches (not dev — dev bumps manually) if [[ "$BRANCH" != dev/* ]]; then git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - BUMPED=$(php /tmp/mokostandards/api/cli/version_bump.php --path . 2>/dev/null || true) + BUMPED=$(php /tmp/mokostandards-api/cli/version_bump.php --path . 2>/dev/null || true) if [ -n "$BUMPED" ]; then - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null || echo "$VERSION") + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "$VERSION") git add -A git commit -m "chore(version): auto-bump patch ${VERSION} [skip ci]" \ --author="github-actions[bot] " 2>/dev/null || true @@ -326,11 +326,11 @@ jobs: printf ',"password":"%s"}' "$DEV_PASS" >> /tmp/sftp-config.json fi - PLATFORM=$(php /tmp/mokostandards/api/cli/platform_detect.php --path . 2>/dev/null || true) - if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards/api/deploy/deploy-joomla.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-joomla.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json - elif [ -f "/tmp/mokostandards/api/deploy/deploy-sftp.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-sftp.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-joomla.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json + elif [ -f "/tmp/mokostandards-api/deploy/deploy-sftp.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-sftp.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json fi rm -f /tmp/deploy_key /tmp/sftp-config.json echo "SFTP deploy to dev complete" >> $GITHUB_STEP_SUMMARY diff --git a/templates/workflows/shared/auto-release.yml.template b/templates/workflows/shared/auto-release.yml.template index d3fa880..80357bb 100644 --- a/templates/workflows/shared/auto-release.yml.template +++ b/templates/workflows/shared/auto-release.yml.template @@ -71,15 +71,15 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet # -- STEP 1: Read version ----------------------------------------------- - name: "Step 1: Read version from README.md" id: version run: | - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null) + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null) if [ -z "$VERSION" ]; then echo "No VERSION in README.md — skipping release" echo "skip=true" >> "$GITHUB_OUTPUT" @@ -219,7 +219,7 @@ jobs: steps.check.outputs.already_released != 'true' run: | VERSION="${{ steps.version.outputs.version }}" - php /tmp/mokostandards/api/cli/version_set_platform.php \ + php /tmp/mokostandards-api/cli/version_set_platform.php \ --path . --version "$VERSION" --branch main # -- STEP 4: Update version badges ---------------------------------------- @@ -284,7 +284,7 @@ jobs: BRANCH="${{ steps.version.outputs.branch }}" MAJOR="${{ steps.version.outputs.major }}" - NOTES=$(php /tmp/mokostandards/api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) + NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null) [ -z "$NOTES" ] && NOTES="Release ${VERSION}" echo "$NOTES" > /tmp/release_notes.md diff --git a/templates/workflows/shared/deploy-demo.yml.template b/templates/workflows/shared/deploy-demo.yml.template index 1fa1535..aa4dca7 100644 --- a/templates/workflows/shared/deploy-demo.yml.template +++ b/templates/workflows/shared/deploy-demo.yml.template @@ -413,8 +413,8 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet - name: Clear remote destination folder (manual only) @@ -436,7 +436,7 @@ jobs: cat > /tmp/moko_clear.php << 'PHPEOF' /dev/null || true) - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null || echo "unknown") + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "unknown") REPO="${{ github.repository }}" if [ "$PLATFORM" = "crm-module" ]; then @@ -622,11 +622,11 @@ jobs: DEPLOY_ARGS+=(--key-passphrase "$SFTP_PASSWORD") fi - PLATFORM=$(php /tmp/mokostandards/api/cli/platform_detect.php --path . 2>/dev/null || true) - if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards/api/deploy/deploy-joomla.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" else - php /tmp/mokostandards/api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" + php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" fi # Remove temp files that should never be left behind rm -f /tmp/deploy_key /tmp/sftp-config.json diff --git a/templates/workflows/shared/deploy-dev.yml.template b/templates/workflows/shared/deploy-dev.yml.template index 2000a9e..880e30c 100644 --- a/templates/workflows/shared/deploy-dev.yml.template +++ b/templates/workflows/shared/deploy-dev.yml.template @@ -412,8 +412,8 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet - name: Clear remote destination folder (manual only) @@ -435,7 +435,7 @@ jobs: cat > /tmp/moko_clear.php << 'PHPEOF' /dev/null || true) + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) REPO="${{ github.repository }}" BRANCH="${{ github.ref_name }}" @@ -584,7 +584,7 @@ jobs: VERSION_LABEL="development" if [[ "$BRANCH" == rc/* ]]; then STABILITY="rc" - VERSION_LABEL=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null || echo "${BRANCH#rc/}")-rc + VERSION_LABEL=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "${BRANCH#rc/}")-rc fi if [ "$PLATFORM" = "crm-module" ]; then @@ -647,11 +647,11 @@ jobs: # Use Joomla-aware deploy for waas-component (routes files to correct Joomla dirs) # Use standard SFTP deploy for everything else - PLATFORM=$(php /tmp/mokostandards/api/cli/platform_detect.php --path . 2>/dev/null || true) - if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards/api/deploy/deploy-joomla.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" else - php /tmp/mokostandards/api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" + php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" fi # (both scripts handle dotfile skipping and .ftpignore natively) # Remove temp files that should never be left behind diff --git a/templates/workflows/shared/deploy-rs.yml.template b/templates/workflows/shared/deploy-rs.yml.template index 2bf95ba..2bcbb74 100644 --- a/templates/workflows/shared/deploy-rs.yml.template +++ b/templates/workflows/shared/deploy-rs.yml.template @@ -409,8 +409,8 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet - name: Clear remote destination folder (manual only) @@ -432,7 +432,7 @@ jobs: cat > /tmp/moko_clear.php << 'PHPEOF' /dev/null || true) - if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards/api/deploy/deploy-joomla.php" ]; then - php /tmp/mokostandards/api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" + PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true) + if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then + php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}" else - php /tmp/mokostandards/api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" + php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}" fi # Remove temp files that should never be left behind rm -f /tmp/deploy_key /tmp/sftp-config.json diff --git a/templates/workflows/shared/sync-version-on-merge.yml.template b/templates/workflows/shared/sync-version-on-merge.yml.template index e4e97f6..8eda567 100644 --- a/templates/workflows/shared/sync-version-on-merge.yml.template +++ b/templates/workflows/shared/sync-version-on-merge.yml.template @@ -64,8 +64,8 @@ jobs: run: | git clone --depth 1 --branch {{standards_branch}} --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ - /tmp/mokostandards - cd /tmp/mokostandards + /tmp/mokostandards-api + cd /tmp/mokostandards-api composer install --no-dev --no-interaction --quiet - name: Auto-bump patch version @@ -76,7 +76,7 @@ jobs: exit 0 fi - RESULT=$(php /tmp/mokostandards/api/cli/version_bump.php --path .) || { + RESULT=$(php /tmp/mokostandards-api/cli/version_bump.php --path .) || { echo "⚠️ Could not bump version — skipping" exit 0 } @@ -92,7 +92,7 @@ jobs: id: readme_version run: | git pull --ff-only 2>/dev/null || true - VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null) + VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null) if [ -z "$VERSION" ]; then echo "⚠️ No VERSION in README.md — skipping propagation" echo "skip=true" >> $GITHUB_OUTPUT @@ -105,7 +105,7 @@ jobs: - name: Run version sync if: ${{ steps.readme_version.outputs.skip != 'true' && inputs.dry_run != true }} run: | - php /tmp/mokostandards/api/maintenance/update_version_from_readme.php \ + php /tmp/mokostandards-api/maintenance/update_version_from_readme.php \ --path . \ --create-issue \ --repo "${{ github.repository }}"