Skip to content

Commit

Permalink
Merge branch 'add-bake' into update-marsante-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
marsante committed Dec 8, 2024
2 parents b18355c + 2906287 commit 9e5cc4f
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 13 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"phpmailer/phpmailer": "^6.8.0",
"webit/eval-math": "1.0.1",
"ovh/ovh": "v2.0.1",
"box/spout": "2.7.3",
"setasign/fpdi-fpdf": "v2.3.0",
"openspout/openspout": "^4.24.5",
"setasign/fpdf": "^1.8.6",
"setasign/fpdi": "^2.6",
"spomky-labs/otphp": "^10.0",
"picqer/php-barcode-generator": "v2.2.4",
"php": ">=8.1.0",
Expand Down
7 changes: 4 additions & 3 deletions controlers/configuration/configCredits.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*
* @author Bertrand Boutillier <[email protected]>
* @contrib fr33z00 <https://github.com/fr33z00>
* @contrib Michaël Val
*/

$template = 'configCredits';
Expand Down Expand Up @@ -117,9 +118,9 @@
'description' => 'This is a stupid jQuery table sorting plugin',
'url' => 'https://github.com/joequery/Stupid-Table-Plugin'
);
$p['page']['thanks']['Spout'] = array(
'description' => 'Spout is a PHP library to read and write spreadsheet files',
'url' => 'https://github.com/box/spout'
$p['page']['thanks']['OpenSpout'] = array(
'description' => 'OpenSpout is a PHP library to read and write spreadsheet files',
'url' => 'https://github.com/openspout/openspout'
);
$p['page']['thanks']['EvalMath'] = array(
'description' => 'Safely evaluate math expressions',
Expand Down
8 changes: 4 additions & 4 deletions controlers/outils/actions/inc-action-exportDataDownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
* Outils : export data -> retourner le csv
*
* @author Bertrand Boutillier <[email protected]>
* contrib Michaël Val
*/

use Box\Spout\Writer\WriterFactory;
use Box\Spout\Common\Type;
use OpenSpout\Writer\Common\Creator\WriterEntityFactory; // namespace is no longer "OpenSpout\Writer"

//admin uniquement
if ($p['config']['droitExportPeutExporterPropresData'] != 'true') {
Expand Down Expand Up @@ -121,10 +121,10 @@
$corres = $formExport->getTabCorrespondances();

if ($_POST['option_file_format'] == 'xlsx') {
$writer = WriterFactory::create(Type::XLSX);
$writer = WriterEntityFactory::createXLSXWriter(); // replaces WriterFactory::create(Type::XLSX)
$writer->openToBrowser('export.xlsx');
} else {
$writer = WriterFactory::create(Type::ODS);
$writer = WriterEntityFactory::createODSWriter(); // replaces WriterFactory::create(Type::ODS)
$writer->openToBrowser('export.ods');
}
$datasheet = $writer->getCurrentSheet();
Expand Down
4 changes: 2 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN set -ex; \
--with-freetype \
--with-jpeg \
; \
docker-php-ext-install \
docker-php-ext-install -j$(nproc) \
bcmath \
gd \
imap \
Expand Down Expand Up @@ -83,7 +83,7 @@ RUN set -ex; \
COPY config/30-custom-php.ini "$PHP_INI_DIR/conf.d"
COPY --from=docker.io/composer:2.5 /usr/bin/composer /usr/local/bin/composer
COPY config/vhost-docker /etc/apache2/sites-available/000-default.conf
ENV VRELEASE=v8.1.3
ENV VRELEASE=master
RUN curl -fsSL -o /tmp/msehr.tar.gz https://github.com/MedShake/MedShakeEHR-base/archive/"$VRELEASE".tar.gz && \
mkdir /usr/src/medshakeehr && \
tar -xf /tmp/msehr.tar.gz -C /usr/src/medshakeehr --strip-components=1 && \
Expand Down
30 changes: 30 additions & 0 deletions tools/docker/docker_bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
group "default" {
targets = ["production", "development"]
}

target "production" {
context = "./"
dockerfile = "Dockerfile"
platforms = ["linux/amd64", "linux/arm64"]
args = {
PHPSTAGE = "production"
VRELEASE = "master"
}
tags = [
"marsante/msehr:master",
"marsante/msehr:latest"
]
}

target "development" {
context = "./"
dockerfile = "Dockerfile"
platforms = ["linux/amd64", "linux/arm64"]
args = {
PHPSTAGE = "development"
VRELEASE = "master"
}
tags = [
"marsante/msehr:dev"
]
}
2 changes: 1 addition & 1 deletion upgrade/base/sqlInstall.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ INSERT IGNORE INTO `prescriptions` (`cat`, `label`, `description`, `fromID`, `to

-- system
INSERT IGNORE INTO `system` (`name`, `groupe`, `value`) VALUES
('base', 'module', 'v8.1.2'),
('base', 'module', 'v8.1.3'),
('state', 'system', 'normal');

-- univtags_type
Expand Down
2 changes: 2 additions & 0 deletions upgrade/base/sqlUpgrade_v8.1.2_v8.1.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Mise à jour n° de version
UPDATE `system` SET `value`='v8.1.3' WHERE `name`='base' and `groupe`='module';
12 changes: 12 additions & 0 deletions upgrade/base/sqlUpgrade_v8.1.2_v8.1.3_post.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
// composer
$initialDir=getcwd();

$pathToComposer='php '.$p['homepath'].'composer.phar';
file_put_contents($p['homepath'].'composer.phar', fopen("https://getcomposer.org/download/latest-stable/composer.phar", 'r'));

chdir($p['config']['webDirectory']);
exec('COMPOSER_HOME="/tmp/" '.$pathToComposer.' update 2>&1', $output);
chdir($p['homepath']);
exec('COMPOSER_HOME="/tmp/" '.$pathToComposer.' update 2>&1', $output);
chdir($initialDir);
2 changes: 1 addition & 1 deletion versionMedShakeEHR-base.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.1.2
v8.1.3

0 comments on commit 9e5cc4f

Please sign in to comment.