Skip to content

Commit 0af94d0

Browse files
Merge pull request #4 from appsfortableau/update-with-2.7.7
2 parents a51491d + bf1f7ef commit 0af94d0

87 files changed

Lines changed: 3326 additions & 1091 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-unix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ jobs:
136136
macos-x86_64)
137137
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
138138
BUILD_CMD="./bin/spc build"
139-
RUNS_ON="macos-13"
139+
RUNS_ON="macos-15-intel"
140140
;;
141141
macos-aarch64)
142142
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
143143
BUILD_CMD="./bin/spc build"
144-
RUNS_ON="macos-14"
144+
RUNS_ON="macos-15"
145145
;;
146146
esac
147147
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"

.github/workflows/ext-matrix-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ jobs:
8585
- "8.4"
8686
operating-system:
8787
- "ubuntu-latest"
88-
#- "macos-13"
88+
#- "macos-15-intel"
8989
#- "debian-arm64-self-hosted"
90-
- "macos-14"
90+
- "macos-15"
9191

9292
steps:
9393
- name: "Checkout"
@@ -99,11 +99,11 @@ jobs:
9999
OS=""
100100
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
101101
OS="linux-x86_64"
102-
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
102+
elif [ "${{ matrix.operating-system }}" = "macos-15-intel" ]; then
103103
OS="macos-x86_64"
104104
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
105105
OS="linux-aarch64"
106-
elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then
106+
elif [ "${{ matrix.operating-system }}" = "macos-15" ]; then
107107
OS="macos-aarch64"
108108
fi
109109
echo "OS=$OS" >> $GITHUB_ENV

.github/workflows/release-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
os: "ubuntu-latest"
2828
filename: "spc-linux-x86_64.tar.gz"
2929
- name: "macos-x86_64"
30-
os: "macos-13"
30+
os: "macos-15-intel"
3131
filename: "spc-macos-x86_64.tar.gz"
3232
- name: "linux-aarch64"
3333
os: "ubuntu-latest"
@@ -147,11 +147,11 @@ jobs:
147147
- name: "linux-x86_64"
148148
os: "ubuntu-latest"
149149
- name: "macos-x86_64"
150-
os: "macos-13"
150+
os: "macos-15-intel"
151151
- name: "linux-aarch64"
152152
os: "ubuntu-24.04-arm"
153153
- name: "macos-aarch64"
154-
os: "macos-latest"
154+
os: "macos-15"
155155
- name: "windows-x64"
156156
os: "windows-latest"
157157
steps:

.github/workflows/tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- 'src/globals/test-extensions.php'
94
pull_request:
105
branches: [ "main" ]
6+
types: [ opened, synchronize, reopened ]
117
paths:
128
- 'src/**'
139
- 'config/**'
@@ -179,7 +175,7 @@ jobs:
179175
key: php-dependencies-${{ matrix.os }}
180176

181177
- name: "Install Dependencies"
182-
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
178+
run: composer update -vvv --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-plugins
183179

184180
- name: "Run Build Tests (doctor)"
185181
run: php src/globals/test-extensions.php doctor_cmd ${{ matrix.os }} ${{ matrix.php }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ docker/source/
2222
# default package root directory
2323
/pkgroot/**
2424

25+
# Windows PHP SDK binary tools
26+
/php-sdk-binary-tools/**
27+
2528
# default pack:lib and release directory
2629
/dist/**
2730
packlib_files.txt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ with popular extensions.
1919
- :wrench: Configurable source code patching
2020
- :books: Intelligent dependency management
2121
- 📦 Self-contained `spc` executable (built with [box](https://github.com/box-project/box))
22-
- :fire: Support 75+ popular [extensions](https://static-php.dev/en/guide/extensions.html)
22+
- :fire: Support 100+ popular [extensions](https://static-php.dev/en/guide/extensions.html)
2323
- :floppy_disk: UPX compression support (reduces binary size by 30-50%)
2424

2525
**Single-file standalone php-cli:**

bin/spc-alpine-docker

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/source:/app/source"
150150
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/dist:/app/dist"
151151
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/downloads:/app/downloads"
152152
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/pkgroot:/app/pkgroot"
153+
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/log:/app/log"
153154
if [ -f "$(pwd)/craft.yml" ]; then
154155
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/craft.yml:/app/craft.yml"
155156
fi
@@ -161,6 +162,47 @@ if [ ! -z "$GITHUB_TOKEN" ]; then
161162
ENV_LIST="$ENV_LIST -e GITHUB_TOKEN=$GITHUB_TOKEN"
162163
fi
163164

165+
# Intercept and rewrite --with-frankenphp-app option, and mount host path to /app/app
166+
FRANKENPHP_APP_PATH=""
167+
NEW_ARGS=()
168+
while [ $# -gt 0 ]; do
169+
case "$1" in
170+
--with-frankenphp-app=*)
171+
FRANKENPHP_APP_PATH="${1#*=}"
172+
NEW_ARGS+=("--with-frankenphp-app=/app/app")
173+
shift
174+
;;
175+
--with-frankenphp-app)
176+
if [ -n "${2:-}" ]; then
177+
FRANKENPHP_APP_PATH="$2"
178+
NEW_ARGS+=("--with-frankenphp-app=/app/app")
179+
shift 2
180+
else
181+
NEW_ARGS+=("$1")
182+
shift
183+
fi
184+
;;
185+
*)
186+
NEW_ARGS+=("$1")
187+
shift
188+
;;
189+
esac
190+
done
191+
192+
# Normalize the path and add mount if provided
193+
if [ -n "$FRANKENPHP_APP_PATH" ]; then
194+
# expand ~ to $HOME
195+
if [ "${FRANKENPHP_APP_PATH#~}" != "$FRANKENPHP_APP_PATH" ]; then
196+
FRANKENPHP_APP_PATH="$HOME${FRANKENPHP_APP_PATH#~}"
197+
fi
198+
# make absolute if relative
199+
case "$FRANKENPHP_APP_PATH" in
200+
/*) ABS_APP_PATH="$FRANKENPHP_APP_PATH" ;;
201+
*) ABS_APP_PATH="$(pwd)/$FRANKENPHP_APP_PATH" ;;
202+
esac
203+
MOUNT_LIST="$MOUNT_LIST -v $ABS_APP_PATH:/app/app"
204+
fi
205+
164206
# Run docker
165207
# shellcheck disable=SC2068
166208
# shellcheck disable=SC2086
@@ -182,5 +224,5 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
182224
set -ex
183225
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
184226
else
185-
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
227+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc "${NEW_ARGS[@]}"
186228
fi

bin/spc-gnu-docker

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/source:/app/source"
158158
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/dist:/app/dist"
159159
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/downloads:/app/downloads"
160160
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/pkgroot:/app/pkgroot"
161+
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/log:/app/log"
161162
if [ -f "$(pwd)/craft.yml" ]; then
162163
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/craft.yml:/app/craft.yml"
163164
fi
@@ -173,6 +174,47 @@ if [ ! -z "$GITHUB_TOKEN" ]; then
173174
ENV_LIST="$ENV_LIST -e GITHUB_TOKEN=$GITHUB_TOKEN"
174175
fi
175176

177+
# Intercept and rewrite --with-frankenphp-app option, and mount host path to /app/app
178+
FRANKENPHP_APP_PATH=""
179+
NEW_ARGS=()
180+
while [ $# -gt 0 ]; do
181+
case "$1" in
182+
--with-frankenphp-app=*)
183+
FRANKENPHP_APP_PATH="${1#*=}"
184+
NEW_ARGS+=("--with-frankenphp-app=/app/app")
185+
shift
186+
;;
187+
--with-frankenphp-app)
188+
if [ -n "${2:-}" ]; then
189+
FRANKENPHP_APP_PATH="$2"
190+
NEW_ARGS+=("--with-frankenphp-app=/app/app")
191+
shift 2
192+
else
193+
NEW_ARGS+=("$1")
194+
shift
195+
fi
196+
;;
197+
*)
198+
NEW_ARGS+=("$1")
199+
shift
200+
;;
201+
esac
202+
done
203+
204+
# Normalize the path and add mount if provided
205+
if [ -n "$FRANKENPHP_APP_PATH" ]; then
206+
# expand ~ to $HOME
207+
if [ "${FRANKENPHP_APP_PATH#~}" != "$FRANKENPHP_APP_PATH" ]; then
208+
FRANKENPHP_APP_PATH="$HOME${FRANKENPHP_APP_PATH#~}"
209+
fi
210+
# make absolute if relative
211+
case "$FRANKENPHP_APP_PATH" in
212+
/*) ABS_APP_PATH="$FRANKENPHP_APP_PATH" ;;
213+
*) ABS_APP_PATH="$(pwd)/$FRANKENPHP_APP_PATH" ;;
214+
esac
215+
MOUNT_LIST="$MOUNT_LIST -v $ABS_APP_PATH:/app/app"
216+
fi
217+
176218
# Run docker
177219
# shellcheck disable=SC2068
178220
# shellcheck disable=SC2086
@@ -195,5 +237,5 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
195237
set -ex
196238
$DOCKER_EXECUTABLE run $PLATFORM_ARG --privileged --rm -it $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
197239
else
198-
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
240+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc "${NEW_ARGS[@]}"
199241
fi

0 commit comments

Comments
 (0)