-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #496 from mindstellar/release/5.2.0
Release/5.2.0
- Loading branch information
Showing
276 changed files
with
6,624 additions
and
11,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Custom PHP-FPM image with PHP extensions and Composer | ||
FROM php:8.3-fpm-alpine | ||
LABEL maintainer="navjottomer@gmail.com" | ||
|
||
# Download script to install PHP extensions and dependencies | ||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/install-php-extensions | ||
|
||
RUN apk add --no-cache \ | ||
coreutils \ | ||
curl \ | ||
git \ | ||
zip unzip \ | ||
# iconv, mbstring and pdo_sqlite are omitted as they are already installed | ||
&& PHP_EXTENSIONS=" \ | ||
amqp \ | ||
bcmath \ | ||
bz2 \ | ||
curl \ | ||
calendar \ | ||
event \ | ||
exif \ | ||
fileinfo \ | ||
gd \ | ||
gettext \ | ||
intl \ | ||
ldap \ | ||
mcrypt \ | ||
memcached \ | ||
memcache \ | ||
mysqli \ | ||
opcache \ | ||
redis \ | ||
soap \ | ||
sockets \ | ||
xsl \ | ||
zip \ | ||
" \ | ||
&& install-php-extensions $PHP_EXTENSIONS | ||
# Install Composer. | ||
ENV PATH=$PATH:/root/composer/vendor/bin \ | ||
COMPOSER_ALLOW_SUPERUSER=1 \ | ||
COMPOSER_HOME=/root/composer | ||
RUN cd /root \ | ||
# Download installer and check for its integrity. | ||
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \ | ||
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \ | ||
&& sha384sum --check composer-setup.sha384sum \ | ||
# Install Composer 2. | ||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer --2 \ | ||
# Remove installer files. | ||
&& rm /root/composer-setup.php /root/composer-setup.sha384sum | ||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
upload_max_filesize = 100M | ||
post_max_size = 108M | ||
sendmail_path = /usr/bin/mhsendmail --smtp-addr mailhog:1025 | ||
sendmail_path = '/usr/sbin/sendmail -t -i -S mailhog:1025' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,103 @@ | ||
# GitHub Action for Osclass | ||
name: Build | ||
name: Release Workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- develop | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
jobs: | ||
build-test: | ||
create_release_branch_and_tag: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
run: sh ./.build.sh | ||
shell: bash | ||
- run: echo "Uploading release package" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set output | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
- name: Check output | ||
|
||
- name: Get commit message and extract version | ||
id: get_commit_message | ||
run: | | ||
echo ${{ steps.vars.outputs.tag }} | ||
- name: Update draft to ${{ steps.vars.outputs.tag }} | ||
id: create-release | ||
MESSAGE=$(git log --format=%B -n 1 ${{ github.sha }}) | ||
echo "MESSAGE=$MESSAGE" >> $GITHUB_ENV | ||
if [[ $MESSAGE =~ \[release-([0-9]+\.[0-9]+\.[0-9])+\.{0,1}([dev|rc|beta[0-9]*)?\] ]]; then | ||
echo "Release string found in the commit message." | ||
BASE_VERSION="${BASH_REMATCH[1]}" | ||
SUB_VERSION="${BASH_REMATCH[2]}" | ||
SUB_SUB_VERSION="${BASH_REMATCH[3]}" | ||
VERSION=${SUB_VERSION:+$BASE_VERSION.$SUB_VERSION} | ||
VERSION=${VERSION:-$BASE_VERSION} | ||
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV | ||
echo "SUB_VERSION=$SUB_VERSION" >> $GITHUB_ENV | ||
echo "SUB_SUB_VERSION=$SUB_SUB_VERSION" >> $GITHUB_ENV | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
else | ||
echo "No release string found in the commit message." | ||
fi | ||
- name: setup git config | ||
if: env.VERSION != null | ||
id: setup_git | ||
run: | | ||
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV | ||
curl \ | ||
-X POST \ | ||
-H 'Accept: application/vnd.github.v3+json' \ | ||
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | ||
https://api.github.com/repos/mindstellar/Osclass/releases \ | ||
-d '{"tag_name":"${{ steps.vars.outputs.tag }}", "name": "Osclass v${{ steps.vars.outputs.tag }}", "draft": true}' >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- run: | | ||
curl \ | ||
-X POST \ | ||
-H 'Accept: application/vnd.github.v3+json' \ | ||
-H 'Content-Type: application/zip' \ | ||
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | ||
https://uploads.github.com/repos/mindstellar/Osclass/releases/${{fromJSON(env.JSON_RESPONSE).id }}/assets?name=osclass_v${{ steps.vars.outputs.tag }}.zip \ | ||
--data-binary "@release/osclass_v${{ steps.vars.outputs.tag }}.zip" | ||
# setup the username and email.'GitHub Actions Bot' with no email by default | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
- name: Create branch/tag | ||
if: env.VERSION != null | ||
id: create_branch | ||
run: | | ||
echo "Base version: $BASE_VERSION" | ||
echo "Sub version: $SUB_VERSION" | ||
echo "Sub sub version: $SUB_SUB_VERSION" | ||
echo "Version: $VERSION" | ||
# Create release branch if not dev and release branch does not exist | ||
if [[ $SUB_VERSION != "dev" ]]; then | ||
# check if release branch already exists | ||
if git show-ref --verify --quiet refs/heads/release/$BASE_VERSION; then | ||
echo "Release branch already exists." | ||
# checkout release branch and merge develop branch | ||
git pull origin release/$BASE_VERSION | ||
git checkout release/$BASE_VERSION | ||
git merge develop | ||
else | ||
git checkout -b release/$BASE_VERSION | ||
fi | ||
fi | ||
# Update version in codebase | ||
sed -i -E "s/define\('OSCLASS_VERSION.+\);/define('OSCLASS_VERSION', '$VERSION');/" oc-includes/osclass/default-constants.php | ||
# Commit changes if changes were made | ||
if [[ $(git status --porcelain) ]]; then | ||
git add oc-includes/osclass/default-constants.php | ||
git commit -m "Update version to $VERSION" | ||
fi | ||
# Push changes and create tag | ||
git push origin HEAD | ||
git tag -a $VERSION -m "Release $VERSION" | ||
git push origin $VERSION | ||
# Determine if pre-release dev release | ||
PRERELEASE=false | ||
if [[ $SUB_VERSION =~ (dev|rc|beta) ]]; then | ||
PRERELEASE=true | ||
fi | ||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV | ||
|
||
|
||
- name: Create GitHub Release Archive | ||
if: env.VERSION != null | ||
run: | | ||
sh ./.build.sh | ||
- name: Create GitHub Release | ||
#Only create a release if the version is dev | ||
if: env.VERSION != null | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: release/osclass_v${{ env.VERSION }}.zip | ||
tag_name: ${{ env.BASE_VERSION }} | ||
name: Release ${{ env.BASE_VERSION }} | ||
draft: true | ||
prerelease: ${{ env.PRERELEASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
## Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0} | ||
* Fixed a bug that prevented adding new custom fields in admin dashboard. | ||
* Fixed a potential bug which could lead to core file deletion. | ||
## Update changelog for Osclass 5.2.0 Release Notes {#release-notes-5-2-0} | ||
* New: Added support for PHP 8.0+ to 8.3 | ||
* New: Mysql8 support | ||
* Fixed: [#462](https://github.com/mindstellar/Osclass/issues/462) | ||
* Fixed: Multiple security issues as reported | ||
* Fixed: Other Multiple bug fixes | ||
* Fixed: Multiple performance improvements | ||
* For more details, please check the commit history | ||
Source: https://github.com/mindstellar/Osclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.