diff --git a/.env b/.env index 30d7d95..c8c1b1e 100644 --- a/.env +++ b/.env @@ -1,5 +1,6 @@ HOST=local-development.ury.org.uk REACT_APP_VERSION=$npm_package_version +REACT_APP_HOMEPAGE=$npm_package_homepage REACT_APP_MYRADIO_NONAPI_BASE=https://ury.org.uk/myradio-staging REACT_APP_MYRADIO_BASE=https://ury.org.uk/api-staging/v2 REACT_APP_BROADCAST_API_BASE=https://ury.org.uk/webstudio/api/v1 diff --git a/.gitignore b/.gitignore index 3e11a7f..b24cd4f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ yarn-error.log* .mypy_cache/ env/ env.ci/ +venv/ serverconfig.ini diff --git a/Jenkinsfile b/Jenkinsfile index e163177..170896f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,7 +71,7 @@ pipeline { } steps { sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json' - sh 'REACT_APP_GIT_SHA=`git rev-parse --short HEAD` yarn build' + sh 'REACT_APP_GIT_SHA=`git rev-parse --short HEAD` REACT_APP_PRODUCTION=true yarn build' sshagent(credentials: ['ury']) { sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio' } diff --git a/src/showplanner/PISModal.tsx b/src/showplanner/PISModal.tsx index 54ba90b..ab01b61 100644 --- a/src/showplanner/PISModal.tsx +++ b/src/showplanner/PISModal.tsx @@ -3,6 +3,20 @@ import Modal from "react-modal"; import { getLatestNewsItem, NewsEntry } from "../api"; import { Button } from "reactstrap"; +function DevWarning() { + if (process.env.REACT_APP_PRODUCTION === "true") { + return null; + } + return ( +
+

Development Version

+ You are using a development version of WebStudio. This version is NOT tested and may have severe bugs and performance problems.
+ DO NOT BROADCAST LIVE SHOWS USING THIS VERSION!
+ For the latest and greatest tested WebStudio, go to {process.env.REACT_APP_HOMEPAGE}. +
+ ); +} + export function PisModal({ close, isOpen, @@ -35,6 +49,7 @@ export function PisModal({ return ( +

Presenter News

{(news === "loading" || news === "not_loaded") && (

Loading the news...