Skip to content

Commit

Permalink
XMDS: Dependencies should come via HTTP if possible + some other mino…
Browse files Browse the repository at this point in the history
…r updates (xibosignage#1954)

* Env: final catch outputting a friendly error. xibosignage/xibo#3067
* Fix translation with /r in it.
* Chore:
 - rename full screen scheduling
 - remove layout add form
 - remove twitter
* Widget: update HLS.js to the latest release xibosignageltd/xibo-private#378
* Chore: add primary key to lkdgdg xibosignageltd/xibo-private#375
* XMDS: bundle/assets via HTTP/CDN xibosignageltd/xibo-private#374
* DataSet: fix lock deleting a dataset.
* Layout import: fails when there is a subplaylist but no playlist data in the import file.
* Maintenance: seed DB task by name. protect against missing assets.
  • Loading branch information
dasgarner authored Aug 1, 2023
1 parent 90e1efb commit baa40b8
Show file tree
Hide file tree
Showing 40 changed files with 430 additions and 1,057 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
docker pull ghcr.io/xibosignage/xibo-xmr:latest
- name: Run
run: |
docker run --name cms-db -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=cms -e MYSQL_USER=cms -e MYSQL_PASSWORD=jenkins -d mysql:5.7
docker run --name cms-db -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=cms -e MYSQL_USER=cms -e MYSQL_PASSWORD=jenkins -d mysql:8
docker run --name cms-xmr -d ghcr.io/xibosignage/xibo-xmr:latest
docker run --name cms-web -e MYSQL_USER=cms -e MYSQL_PASSWORD=jenkins -e XIBO_DEV_MODE=true -e XMR_HOST=cms-xmr --link cms-db:db --link cms-xmr:50001 -d cms-web
- name: Wait for CMS
Expand All @@ -47,7 +47,7 @@ jobs:
run: |
docker exec cms-db mysql -ucms -pjenkins cms -e "UPDATE setting SET value=\"6v4RduQhaw5Q\" WHERE setting = \"SERVER_KEY\" "
docker exec cms-db mysql -ucms -pjenkins cms -e "INSERT INTO task (name, class, status, isActive, configFile, options, schedule) VALUES ('Seed Database', '\\\\Xibo\\\\XTR\\\\SeedDatabaseTask', 2, 1, '/tasks/seed-database.task', '{}', '* * * * * *')"
docker exec --user www-data -t cms-web /bin/bash -c "cd /var/www/cms; /usr/bin/php bin/run.php 20"
docker exec --user www-data -t cms-web /bin/bash -c "cd /var/www/cms; /usr/bin/php bin/run.php \"Seed Database\""
sleep 5
- name: Run PHP Unit
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/*
* Copyright (C) 2022 Xibo Signage Ltd
* Copyright (C) 2023 Xibo Signage Ltd
*
* Xibo - Digital Signage - http://www.xibo.org.uk
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
Expand Down Expand Up @@ -31,12 +31,12 @@ class AddTwitterConnectorMigration extends AbstractMigration
{
public function change()
{
$this->table('connectors')
/*$this->table('connectors')
->insert([
'className' => '\\Xibo\\Connector\\TwitterConnector',
'isEnabled' => 0,
'isVisible' => 1
])
->save();
->save();*/
}
}
17 changes: 0 additions & 17 deletions db/migrations/20220915100902_add_fonts_table_migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,5 @@ public function change()
if (file_exists($libraryLocation . 'fonts.css')) {
@unlink($libraryLocation . 'fonts.css');
}

// add a task that will re-generate fonts.css for the player
$this->table('task')
->insert([
[
'name' => 'Generate Player font css',
'class' => '\Xibo\XTR\GeneratePlayerCssTask',
'options' => '[]',
'schedule' => '*/5 * * * * *',
'isActive' => '1',
'configFile' => '/tasks/player-css.task',
'pid' => 0,
'lastRunDt' => 0,
'lastRunDuration' => 0,
'lastRunExitCode' => 0
],
])->save();
}
}
38 changes: 38 additions & 0 deletions db/migrations/20230731194700_lkdgdg_primary_key_migration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/*
* Copyright (C) 2023 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/

use Phinx\Migration\AbstractMigration;

/**
* lkdgdg must have a primary key for MySQL8 clustering
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
class LkdgdgPrimaryKeyMigration extends AbstractMigration
{
public function change(): void
{
$pk = $this->fetchAll('SHOW KEYS FROM `lkdgdg` WHERE `Key_name` = \'PRIMARY\'');
if (count($pk) <= 0) {
$this->execute('ALTER TABLE `lkdgdg` ADD COLUMN `id` INT(11) PRIMARY KEY AUTO_INCREMENT');
}
}
}
Loading

0 comments on commit baa40b8

Please sign in to comment.