Skip to content

Commit

Permalink
Merge pull request #28 from ggtakec/fix_bugs
Browse files Browse the repository at this point in the history
Fixed phpexttypevars.sh and php_alpine_build.sh
  • Loading branch information
ggtakec authored Feb 24, 2023
2 parents 5b69fb8 + 70872d8 commit 4d87576
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/phpexttypevars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ elif [ "${CI_PHPTYPE}" = "PHP7.4" ] || [ "${CI_PHPTYPE}" = "PHP74" ] || [ "${CI_
PHPVER_WITHPERIOD="7.4"
elif [ "${CI_PHPTYPE}" = "PHP8.0" ] || [ "${CI_PHPTYPE}" = "PHP80" ] || [ "${CI_PHPTYPE}" = "8.0" ] || [ "${CI_PHPTYPE}" = "80" ]; then
PHPVER_NOPERIOD="80"
PHPVER_WITHPERIOD="8.1"
PHPVER_WITHPERIOD="8.0"
elif [ "${CI_PHPTYPE}" = "PHP8.1" ] || [ "${CI_PHPTYPE}" = "PHP81" ] || [ "${CI_PHPTYPE}" = "8.1" ] || [ "${CI_PHPTYPE}" = "81" ]; then
PHPVER_NOPERIOD="81"
PHPVER_WITHPERIOD="8.1"
Expand Down Expand Up @@ -173,7 +173,7 @@ elif [ "${CI_OSTYPE}" = "ubuntu:22.04" ] || [ "${CI_OSTYPE}" = "ubuntu:jammy" ];

INSTALL_PHP_PRE_ADD_REPO="ca-certificates apt-transport-https software-properties-common"
INSTALL_PHP_REPO="ppa:ondrej/php"
INSTALL_PHP_PKG_LIST="dh-php php-all-dev php${PHPVER_WITHPERIOD} libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_PKG_LIST="dh-php php${PHPVER_WITHPERIOD} php${PHPVER_WITHPERIOD}-dev libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_OPT=""
INSTALL_PHP_POST_CONFIG="update-alternatives --set php-config /usr/bin/php-config${PHPVER_WITHPERIOD}"
INSTALL_PHP_POST_BIN="update-alternatives --set php /usr/bin/php${PHPVER_WITHPERIOD}"
Expand All @@ -197,7 +197,7 @@ elif [ "${CI_OSTYPE}" = "ubuntu:20.04" ] || [ "${CI_OSTYPE}" = "ubuntu:focal" ];

INSTALL_PHP_PRE_ADD_REPO="ca-certificates apt-transport-https software-properties-common"
INSTALL_PHP_REPO="ppa:ondrej/php"
INSTALL_PHP_PKG_LIST="dh-php php-all-dev php${PHPVER_WITHPERIOD} libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_PKG_LIST="dh-php php${PHPVER_WITHPERIOD} php${PHPVER_WITHPERIOD}-dev libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_OPT=""
INSTALL_PHP_POST_CONFIG="update-alternatives --set php-config /usr/bin/php-config${PHPVER_WITHPERIOD}"
INSTALL_PHP_POST_BIN="update-alternatives --set php /usr/bin/php${PHPVER_WITHPERIOD}"
Expand All @@ -221,7 +221,7 @@ elif [ "${CI_OSTYPE}" = "ubuntu:18.04" ] || [ "${CI_OSTYPE}" = "ubuntu:bionic" ]

INSTALL_PHP_PRE_ADD_REPO="ca-certificates apt-transport-https software-properties-common"
INSTALL_PHP_REPO="ppa:ondrej/php"
INSTALL_PHP_PKG_LIST="dh-php php-all-dev php${PHPVER_WITHPERIOD} libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_PKG_LIST="dh-php php${PHPVER_WITHPERIOD} php${PHPVER_WITHPERIOD}-dev libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_OPT=""
INSTALL_PHP_POST_CONFIG="update-alternatives --set php-config /usr/bin/php-config${PHPVER_WITHPERIOD}"
INSTALL_PHP_POST_BIN="update-alternatives --set php /usr/bin/php${PHPVER_WITHPERIOD}"
Expand All @@ -247,7 +247,7 @@ elif [ "${CI_OSTYPE}" = "debian:11" ] || [ "${CI_OSTYPE}" = "debian:bullseye" ];
INSTALL_PHP_REPO="packages.sury.org/php"
INSTALL_PHP_REPO_GPG_URL="https://packages.sury.org/php/apt.gpg"
INSTALL_PHP_REPO_GPG_FILEPATH="/usr/share/keyrings/deb.sury.org-php.gpg"
INSTALL_PHP_PKG_LIST="dh-php php-all-dev php${PHPVER_WITHPERIOD} libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_PKG_LIST="dh-php php${PHPVER_WITHPERIOD} php${PHPVER_WITHPERIOD}-dev libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_OPT=""
INSTALL_PHP_POST_CONFIG="update-alternatives --set php-config /usr/bin/php-config${PHPVER_WITHPERIOD}"
INSTALL_PHP_POST_BIN="update-alternatives --set php /usr/bin/php${PHPVER_WITHPERIOD}"
Expand All @@ -273,7 +273,7 @@ elif [ "${CI_OSTYPE}" = "debian:10" ] || [ "${CI_OSTYPE}" = "debian:buster" ]; t
INSTALL_PHP_REPO="packages.sury.org/php"
INSTALL_PHP_REPO_GPG_URL="https://packages.sury.org/php/apt.gpg"
INSTALL_PHP_REPO_GPG_FILEPATH="/usr/share/keyrings/deb.sury.org-php.gpg"
INSTALL_PHP_PKG_LIST="dh-php php-all-dev php${PHPVER_WITHPERIOD} libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_PKG_LIST="dh-php php${PHPVER_WITHPERIOD} php${PHPVER_WITHPERIOD}-dev libapache2-mod-php${PHPVER_WITHPERIOD}"
INSTALL_PHP_OPT=""
INSTALL_PHP_POST_CONFIG="update-alternatives --set php-config /usr/bin/php-config${PHPVER_WITHPERIOD}"
INSTALL_PHP_POST_BIN="update-alternatives --set php /usr/bin/php${PHPVER_WITHPERIOD}"
Expand Down
17 changes: 17 additions & 0 deletions buildutils/php_alpine_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,30 @@ for _one_pkg in "${APK_TOPDIR}"/"${SRCTOP_DIRNAME}"/"${ARCH_NAME}"/*.apk; do
fi
done

#----------------------------------------------------------
# Copy packages
#----------------------------------------------------------
if [ ! -d "${PKG_TOPDIR}" ]; then
PRNTITLE "Create ${PKG_TOPDIR} directory"
if ! mkdir -p "${PKG_TOPDIR}"; then
PRNERR "Failed to create ${PKG_TOPDIR} directory"
exit 1
fi
PRNSUCCESS "Created ${PKG_TOPDIR} directory"
fi

#
# Copy APK packages
#
PRNTITLE "Copy created APK packages to packages directory"

if ! cp -p "${APK_TOPDIR}"/"${SRCTOP_DIRNAME}"/"${ARCH_NAME}"/*.apk "${PKG_TOPDIR}"; then
PRNERR "Failed to copy ${APK_TOPDIR}/${SRCTOP_DIRNAME}/${ARCH_NAME}/*.apk package to ${PKG_TOPDIR} directory."
exit 1
fi
ls -la "${PKG_TOPDIR}"

PRNSUCCESS "Copied created APK packages to packages directory"

#---------------------------------------------------------------
# Finish
Expand Down

0 comments on commit 4d87576

Please sign in to comment.