dist script packs release tarball/zip with "katex" directory prefix again. (#1665)

It does so by mercilessly removing the katex/ folder, if it exists
(presumably left by previous failed dist:zip attempts), copying dist/
to katex/, and archiving the latter. On success, katex/ gets removed.

Settled on this version after a more sophisticated script was considered
to use too much POSIX features (like set and trap) in #1665.

Deliberately not adding katex/ to .gitignore because if katex/ shows up,
it indicates that the latest dist attempt has not completed successfully.
This commit is contained in:
ccorn
2018-09-01 06:54:31 +02:00
committed by ylemkimon
parent 5585187abb
commit d3ec100d02

View File

@@ -90,7 +90,7 @@
"build": "yarn prestart && rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
"watch": "yarn build --watch",
"dist": "yarn test && yarn build && yarn dist:zip",
"dist:zip": "cd dist && tar czf ../katex.tar.gz * && zip -rq ../katex.zip *"
"dist:zip": "rimraf katex/ katex.tar.gz katex.zip && cp -R dist katex && tar czf katex.tar.gz katex && zip -rq katex.zip katex && rimraf katex/"
},
"dependencies": {
"commander": "^2.16.0"