From 664b6800a3995f327a60093c526146f908563e2f Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 19 Sep 2020 13:37:57 +0200 Subject: [PATCH 1/2] Set buurtnatuur as default --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 28f7dbb6eb..acfd944581 100644 --- a/index.ts +++ b/index.ts @@ -36,7 +36,7 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { // ----------------- SELECT THE RIGHT QUESTSET ----------------- -let defaultLayout = "bookcases" +let defaultLayout = "buurtnatuur" const path = window.location.pathname.split("/").slice(-1)[0]; if (path !== "index.html" && path !== "") { From 47a4284ff67574a172df95d76c3b9711b3a9dff7 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 20 Sep 2020 19:11:32 +0200 Subject: [PATCH 2/2] Fix deploy script + more robust --- State.ts | 2 +- deploy.sh | 12 ++++++------ index.ts | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/State.ts b/State.ts index 52a9ddf8f5..09fd9b775c 100644 --- a/State.ts +++ b/State.ts @@ -22,7 +22,7 @@ export class State { // The singleton of the global state public static state: State; - public static vNumber = "0.0.8b"; + public static vNumber = "0.0.8c"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/deploy.sh b/deploy.sh index a0e84b7ff5..bf3c9b57c2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,13 +1,13 @@ #! /bin/bash mkdir -p assets/generated -ts-node createLayouts.ts +ts-node createLayouts.ts || { echo 'Creating layouts failed' ; exit 1; } find -name '*.png' | parallel optipng '{}' -npm run build +npm run build || { echo 'Npm build failed' ; exit 1; } -if [[ $1 == "production" ]] +if [[ $1 == "groen" ]] then - echo "DEPLOYING TO PRODUCTION!" + echo "DEPLOYING TO BUURTNATUUR!" mv /home/pietervdvn/git/buurtnatuur.github.io/CNAME /home/pietervdvn/git/ mv /home/pietervdvn/git/buurtnatuur.github.io/.git /home/pietervdvn/git/ rm -rf /home/pietervdvn/git/buurtnatuur.github.io/* @@ -15,9 +15,9 @@ then mv /home/pietervdvn/git/CNAME /home/pietervdvn/git/buurtnatuur.github.io/ mv /home/pietervdvn/git/.git /home/pietervdvn/git/buurtnatuur.github.io/ cd /home/pietervdvn/git/buurtnatuur.github.io/ -elif [[ $1 == "groen" ]] +elif [[ $1 == "production" ]] then - echo "DEPLOYING TO BUURTNATUUR" + echo "DEPLOYING TO MAPCOMPLETE" rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ cd /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ diff --git a/index.ts b/index.ts index acfd944581..bf29f9255e 100644 --- a/index.ts +++ b/index.ts @@ -7,7 +7,6 @@ import {UIEventSource} from "./Logic/UIEventSource"; import * as $ from "jquery"; import {FromJSON} from "./Customizations/JSON/FromJSON"; import {TagRendering} from "./UI/TagRendering"; -import {State} from "./State"; TagRendering.injectFunction(); @@ -36,7 +35,7 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { // ----------------- SELECT THE RIGHT QUESTSET ----------------- -let defaultLayout = "buurtnatuur" +let defaultLayout = "bookcases" const path = window.location.pathname.split("/").slice(-1)[0]; if (path !== "index.html" && path !== "") { @@ -93,7 +92,7 @@ if (layoutFromBase64.startsWith("wiki:")) { throw e; } }, - }).fail(e => { + }).fail(() => { new FixedUiElement(`${themeName} is invalid:
Could not download - wrong URL?`) .SetClass("clickable") .AttachTo("centermessage");