Skip to content

Commit 2431df4

Browse files
committed
v0.5.7
1 parent 6c6c8d5 commit 2431df4

6 files changed

Lines changed: 13 additions & 32 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,14 @@ jobs:
4040
VET_SEO_IS_SKIP_UA_ETC: true
4141
run: |
4242
npm run build:seo -- ${{ env.RELEASE_VERSION }}
43-
# Merge and minify scripts, data, etc.
43+
# Merge and minify scripts, data, etc. + Build Service Worker
44+
# Remove entries from the `.gitignore` so the gh-pages action can correctly add+commit them to the pages branch
4445
- name: Build Prod
4546
env:
4647
VET_BASE_SITE_URL: https://pf2etools.com/
4748
VET_SEO_IS_SKIP_UA_ETC: true
4849
run: |
49-
npm run build:deploy:prod
50-
# Remove entries from the `.gitignore` so the gh-pages action can correctly add+commit them to the pages branch
51-
- name: Build Service Worker
52-
run: |
53-
npm run build:sw:prod
50+
npm run build:deploy:prod -- ${{ env.RELEASE_VERSION }}
5451
sed -i 's/sw.js//g' .gitignore
5552
sed -i 's/sw-injector.js//g' .gitignore
5653
# See: https://github.com/JamesIves/github-pages-deploy-action

build/deploy-prep-prod.sh

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,4 @@ find . -maxdepth 1 -type f -name '*.html' -print0 |
5050
done
5151

5252
# Rebuild the service worker index, to use our compressed files
53-
npm run build:sw
54-
55-
echo "Installing Query Strings."
56-
# JS files
57-
for file in js/*; do
58-
find . -maxdepth 1 -type f -name '*.html' -print0 |
59-
while IFS= read -r -d $'\0' line; do
60-
sed -i -e "s;$file;$file?v=${version};g" $line
61-
done
62-
done
63-
# Handle the unique service worker .js strings
64-
find . -maxdepth 1 -type f -name '*.html' -print0 |
65-
while IFS= read -r -d $'\0' line; do
66-
sed -i -e "s;/sw.js;/sw.js?v=${version};g" $line
67-
done
68-
# CSS files
69-
for file in css/*; do
70-
find . -maxdepth 1 -type f -name '*.html' -print0 |
71-
while IFS= read -r -d $'\0' line; do
72-
sed -i -e "s;$file;$file?v=${version};g" $line
73-
done
74-
done
53+
npm run build:sw

data/changelog.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@
129129
"ver": "0.5.6",
130130
"date": "2022-06-13",
131131
"txt": "- Fix production script"
132+
},
133+
{
134+
"ver": "0.5.7",
135+
"date": "2022-06-13",
136+
"txt": "- Fix data preparation script\n- Fix service worker script"
132137
}
133138
]
134139
}

js/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if (typeof module !== "undefined") require("./parser.js");
55

66
// in deployment, `IS_DEPLOYED = "<version number>";` should be set below.
77
IS_DEPLOYED = undefined;
8-
VERSION_NUMBER = /* PF2ETOOLS_VERSION__OPEN */"0.5.6"/* PF2ETOOLS_VERSION__CLOSE */;
8+
VERSION_NUMBER = /* PF2ETOOLS_VERSION__OPEN */"0.5.7"/* PF2ETOOLS_VERSION__CLOSE */;
99
DEPLOYED_STATIC_ROOT = ""; // ""; // FIXME re-enable this when we have a CDN again
1010
IS_VTT = false;
1111

node/prepare-data-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ async function replaceReferences (folder) {
3535
const cat_id = Parser._parse_bToA(Parser.CAT_ID_TO_PROP, obj.tag);
3636
const page = UrlUtil.CAT_TO_PAGE[cat_id];
3737
const hash = obj.hash || UrlUtil.URL_TO_HASH_BUILDER[page](obj);
38-
const out = Renderer.hover._getFromCache(page, obj.source, hash);
38+
const out = {type: "data", tag: obj.tag, data: Renderer.hover._getFromCache(page, obj.source, hash)};
3939
if (!out) throw new Error(`Could not find ${page}:${obj.source}:${hash}`);
40-
delete out.__prop;
40+
delete out.data.__prop;
4141
return out;
4242
}
4343
return obj

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pf2etools",
33
"author": "Pf2eTools",
4-
"version": "0.5.6",
4+
"version": "0.5.7",
55
"license": "MIT",
66
"description": "A site dedicated to making playing games with your friends as easy as possible.",
77
"scripts": {

0 commit comments

Comments
 (0)