Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"horde/eventdispatcher": "* || dev-FRAMEWORK_6_0",
"horde/githubapiclient": "* || dev-FRAMEWORK_6_0",
"horde/composer": "* || dev-FRAMEWORK_6_0",
"horde/phpconfigfile": "^0.0.1-alpha4 || dev-FRAMEWORK_6_0"
"horde/phpconfigfile": "^0.0.1-alpha4 || dev-FRAMEWORK_6_0",
"psr/log": "^1.1 || ^2 || ^3"
},
"require-dev": {
"horde/test": "^3 || dev-FRAMEWORK_6_0",
Expand Down Expand Up @@ -83,5 +84,7 @@
"branch-alias": {
"dev-FRAMEWORK_6_0": "1.x-dev"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
25 changes: 18 additions & 7 deletions data/ci/bootstrap-github.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,25 @@ fi
PHP_VERSION=$(php -r 'echo PHP_VERSION;')
log_info "Using runner's PHP version: $PHP_VERSION"

# Stage 3: Download horde-components.phar (or use cached)
if [ -f "$WORK_DIR/bin/horde-components.phar" ]; then
# Stage 3: Locate horde-components.phar
#
# Lookup order:
# 1. Repo-bundled phar at $GITHUB_WORKSPACE/ci-tools/horde-components.phar
# (committed alongside the workflow for repos that pin a specific build)
# 2. Cached phar from a previous run at $WORK_DIR/bin/horde-components.phar
# 3. Download from $COMPONENTS_PHAR_URL
REPO_PHAR="$GITHUB_WORKSPACE/ci-tools/horde-components.phar"
mkdir -p "$WORK_DIR/bin"
COMPONENTS_PHAR="$WORK_DIR/bin/horde-components.phar"

if [ -f "$REPO_PHAR" ]; then
log_info "Using repo-bundled horde-components.phar from ci-tools/"
cp "$REPO_PHAR" "$COMPONENTS_PHAR"
chmod +x "$COMPONENTS_PHAR"
elif [ -f "$COMPONENTS_PHAR" ]; then
log_info "Using cached horde-components.phar"
COMPONENTS_PHAR="$WORK_DIR/bin/horde-components.phar"
else
log_info "Downloading horde-components from $COMPONENTS_PHAR_URL"
mkdir -p "$WORK_DIR/bin"
COMPONENTS_PHAR="$WORK_DIR/bin/horde-components.phar"

if ! curl -sS -L -o "$COMPONENTS_PHAR" "$COMPONENTS_PHAR_URL"; then
log_error "Failed to download horde-components.phar"
Expand All @@ -100,11 +111,11 @@ fi

# Validate it's a valid phar
if ! php "$COMPONENTS_PHAR" help &> /dev/null; then
log_error "Downloaded phar is not valid or not executable"
log_error "horde-components.phar is not valid or not executable"
exit 1
fi

log_info "horde-components.phar downloaded successfully"
log_info "horde-components.phar ready at $COMPONENTS_PHAR"

# Stage 4: Install sudo helper script
log_info "Installing sudo helper script"
Expand Down
2 changes: 1 addition & 1 deletion src/Ci/Template/TemplateRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TemplateRenderer
* This version is embedded in generated files and used to detect
* when components are using outdated templates.
*/
private const TEMPLATE_VERSION = '1.0.0';
private const TEMPLATE_VERSION = '1.1.0';

/**
* Constructor.
Expand Down
Loading