File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ jobs:
216216 targets : static-builder-gnu
217217 set : |
218218 ${{ (github.event_name == 'pull_request' || matrix.platform == 'linux/arm64') && 'static-builder-gnu.args.NO_COMPRESS=1' || '' }}
219+ static-builder-gnu.args.BUILD_PACKAGES=1
219220 *.tags=
220221 *.platform=${{ matrix.platform }}
221222 *.cache-from=type=gha,scope=${{ needs.prepare.outputs.ref || github.ref }}-static-builder-gnu
Original file line number Diff line number Diff line change @@ -31,9 +31,29 @@ if [ ! -f "dist/$bin" ]; then
3131 exit 1
3232fi
3333
34+ if [ -z " ${FRANKENPHP_VERSION} " ]; then
35+ FRANKENPHP_VERSION=" $( git rev-parse --verify HEAD) "
36+ export FRANKENPHP_VERSION
37+ elif [ -d " .git/" ]; then
38+ CURRENT_REF=" $( git rev-parse --abbrev-ref HEAD) "
39+ export CURRENT_REF
40+
41+ if echo " ${FRANKENPHP_VERSION} " | grep -F -q " ." ; then
42+ # Tag
43+
44+ # Trim "v" prefix if any
45+ FRANKENPHP_VERSION=${FRANKENPHP_VERSION# v}
46+ export FRANKENPHP_VERSION
47+
48+ git checkout " v${FRANKENPHP_VERSION} "
49+ else
50+ git checkout " ${FRANKENPHP_VERSION} "
51+ fi
52+ fi
53+
3454if [[ ! " ${FRANKENPHP_VERSION} " =~ ^[0-9]+\. [0-9]+\. [0-9]+$ ]]; then
3555 echo " Error: FRANKENPHP_VERSION must be set to X.Y.Z (e.g. 1.5.1), got '${FRANKENPHP_VERSION} '"
36- exit 1
56+ FRANKENPHP_VERSION=0.0.0
3757fi
3858
3959iteration=" 1"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ FROM centos:7
66ARG FRANKENPHP_VERSION=''
77ENV FRANKENPHP_VERSION=${FRANKENPHP_VERSION}
88
9+ ARG BUILD_PACKAGES=''
10+
911ARG PHP_VERSION=''
1012ENV PHP_VERSION=${PHP_VERSION}
1113
@@ -133,4 +135,7 @@ COPY --link caddy caddy
133135COPY --link internal internal
134136
135137RUN --mount=type=secret,id=github-token ./build-static.sh && \
136- rm -Rf dist/static-php-cli/source/*
138+ rm -Rf dist/static-php-cli/source/* && \
139+ if [ "${BUILD_PACKAGES}" != "" ]; then \
140+ ./build-packages.sh; \
141+ fi
You can’t perform that action at this time.
0 commit comments