Skip to content

Commit

Permalink
Merge pull request #976 from alcaeus/debug-builds
Browse files Browse the repository at this point in the history
Add PHP formulae with debug symbols enabled
  • Loading branch information
shivammathur committed Aug 1, 2022
2 parents 54197ab + f34b878 commit 0786adc
Show file tree
Hide file tree
Showing 14 changed files with 4,549 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/edit.sh
Expand Up @@ -30,7 +30,7 @@ check_changes() {
fetch() {
sudo cp "Formula/$PHP_VERSION.rb" "/tmp/$PHP_VERSION.rb"
if [[ "$PHP_VERSION" =~ php@(5.6|7.[0-3]) ]]; then
commit=$(git ls-remote https://github.com/shivammathur/php-src-backports | grep "refs/tags/${PHP_VERSION/php@}.*{}" | sed "s/\s*refs.*//")
commit=$(git ls-remote https://github.com/shivammathur/php-src-backports | grep "refs/tags/$(echo "$PHP_VERSION" | grep -Eo "[0-9]+.[0-9]+").*{}" | sed "s/\s*refs.*//")
sed -i -e "s|archive.*|archive/$commit.tar.gz\"|g" ./Formula/"$PHP_VERSION".rb
url="$(grep -e "^ url.*" ./Formula/"$PHP_VERSION".rb | cut -d\" -f 2)"
checksum=$(curl -sSL "$url" | shasum -a 256 | cut -d' ' -f 1)
Expand All @@ -48,7 +48,8 @@ fetch() {
fi
elif [[ "$PHP_VERSION" =~ php@8.[2-9] ]]; then
master_version=$(curl -sL https://raw.githubusercontent.com/php/php-src/master/main/php_version.h | grep -Po 'PHP_VERSION "\K[0-9]+\.[0-9]+')
[ "${PHP_VERSION##*@}" = "$master_version" ] && branch=master || branch=PHP-"${PHP_VERSION##*@}"
PHP_MM=$(echo "$PHP_VERSION" | grep -Eo "[0-9]+.[0-9]+")
[ "$PHP_MM" = "$master_version" ] && branch=master || branch=PHP-"$PHP_MM"
commit="$(curl -sL https://api.github.com/repos/php/php-src/commits/"$branch" | sed -n 's|^ "sha":.*"\([a-f0-9]*\)",|\1|p')"
url="https://github.com/php/php-src/archive/$commit.tar.gz?commit=$commit"
checksum=$(curl -sSL "$url" | shasum -a 256 | cut -d' ' -f 1)
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -79,6 +79,15 @@ jobs:
- 'php@7.4'
- 'php@8.0'
- 'php@8.2'
- 'php-debug'
- 'php@5.6-debug'
- 'php@7.0-debug'
- 'php@7.1-debug'
- 'php@7.2-debug'
- 'php@7.3-debug'
- 'php@7.4-debug'
- 'php@8.0-debug'
- 'php@8.2-debug'
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions Aliases/php@8.1-debug

0 comments on commit 0786adc

Please sign in to comment.