Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cdn/deploy
# Shared files are bootstrapped:
resources/bootstrap.inc.sh
resources/.bootstrap-version
resources/.bootstrap-registry
_common/

# State files
Expand Down
21 changes: 21 additions & 0 deletions _includes/2020/WebKeymanComSentry.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);

namespace Keyman\Site\com\keyman\web;

use Keyman\Site\Common\KeymanSentry;
use Keyman\Site\Common\KeymanHosts;

require_once(__DIR__ . '/../../_common/KeymanSentry.php');

const SENTRY_DSN = 'https://11f513ea178d438e8f12836de7baa87d@o1005580.ingest.sentry.io/5983523';

class WebKeymanComSentry {
static function init() {
KeymanSentry::Init(SENTRY_DSN);
}
static function GetBrowserHTML($kmwbuild) {
$tier = KeymanHosts::Instance()->TierName();
return KeymanSentry::GetBrowserHTML(SENTRY_DSN, $tier == 'stable' ? $kmwbuild : "$kmwbuild-$tier");
}
}
2 changes: 1 addition & 1 deletion _includes/autoload.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
spl_autoload_register(function ($class_name) {
if(preg_match('/^Keyman\\\\Site\\\\com\\\\keymanweb\\\\(.+)/', $class_name, $matches)) {
if(preg_match('/^Keyman\\\\Site\\\\com\\\\keyman\\\\web\\\\(.+)/', $class_name, $matches)) {
// Fix namespace pathing for Linux
$filename = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $matches[1]);
$success = @include(__DIR__ . "/2020/{$filename}.php");
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
## START STANDARD SITE BUILD SCRIPT INCLUDE
readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh"
readonly BOOTSTRAP_VERSION=v0.18
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
readonly BOOTSTRAP_VERSION=v0.19
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -H "Cache-Control: no-cache" -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
## END STANDARD SITE BUILD SCRIPT INCLUDE

# TODO: these should probably all be moved to a common defines script too?
Expand Down
1 change: 0 additions & 1 deletion cdn/dev/js/bundle.min.js.map

This file was deleted.

76 changes: 0 additions & 76 deletions cdn/dev/js/sentry.js

This file was deleted.

30 changes: 2 additions & 28 deletions inc/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
session_start();
require_once('servervars.php');

use Keyman\Site\com\keyman\web\WebKeymanComSentry;
use \Keyman\Site\Common\KeymanHosts;

$kmw_tiers = array('alpha', 'beta', 'stable');
Expand Down Expand Up @@ -56,34 +57,7 @@

<title>KeymanWeb.com <?php if($tier != 'stable') echo "($tier)"; ?></title>

<!-- note: using CDN and not bundle for now -->

<script
src="https://js.sentry-cdn.com/bba22972ad6b4c2ab03a056f549cc23d.min.js"
crossorigin="anonymous"
></script>
<script
src="https://browser.sentry-cdn.com/9.1.0/bundle.tracing.min.js"
integrity="sha384-MCeGoX8VPkitB3OcF9YprViry6xHPhBleDzXdwCqUvHJdrf7g0DjOGvrhIzpsyKp"
crossorigin="anonymous"
></script>
<script
src="https://browser.sentry-cdn.com/9.1.0/captureconsole.min.js"
integrity="sha384-gkHY/HxnL+vrTN/Dn6S9siimRwqogMXpX4AetFSsf6X2LMQFsuXQGvIw7h2qWCt+"
crossorigin="anonymous"
></script>
<script
src="https://browser.sentry-cdn.com/9.1.0/httpclient.min.js"
integrity="sha384-ZsomH91NyAZy+YSYhJcpL3sSDFlkL310CJnpKNqL9KerB92RvfsH9tXRa2youKLM"
crossorigin="anonymous"
></script>
<script>
const sentryEnvironment = {
tier: '<?=KeymanHosts::Instance()->TierName()?>',
release: '<?=$tier == 'stable' ? $kmwbuild : "$kmwbuild-$tier"?>',
}
</script>
<script src="<?=cdn("js/sentry.js")?>"></script>
<?= WebKeymanComSentry::GetBrowserHTML($kmwbuild) ?>

<link rel='shortcut icon' href="<?php echo cdn("img/keymanweb-icon-16.png"); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo cdn("css/kmw.css"); ?>" />
Expand Down
5 changes: 2 additions & 3 deletions inc/servervars.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../_includes/autoload.php';
require_once __DIR__ . '/../_common/KeymanSentry.php';

use \Keyman\Site\Common\KeymanHosts;
use \Keyman\Site\com\keyman\web\WebKeymanComSentry;

const SENTRY_DSN = 'https://11f513ea178d438e8f12836de7baa87d@o1005580.ingest.sentry.io/5983523';
\Keyman\Site\Common\KeymanSentry::init(SENTRY_DSN);
WebKeymanComSentry::init();

// latest known version of KeymanWeb
const FALLBACK_KMW_VERSION = '16.0.143';
Expand Down
2 changes: 1 addition & 1 deletion tests/InfrastructureTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Keyman\Site\com\keymanweb\tests;
namespace Keyman\Site\com\keyman\web\tests;

use PHPUnit\Framework\TestCase;

Expand Down