Trying different approach for cleaning cache file of releases

This commit is contained in:
Sana Javed 2023-06-16 23:43:18 +02:00
parent 701482cb9f
commit b256bed29d
2 changed files with 3 additions and 5 deletions

View File

@ -17,8 +17,9 @@
"packageManager": "yarn@3.6.0", "packageManager": "yarn@3.6.0",
"scripts": { "scripts": {
"serve": "run-p 'watch:**'", "serve": "run-p 'watch:**'",
"build": "REBUILD_VERSION_CACHE=true run-s build-dev:scripts 'build:**'", "build": "run-s clean-version-cache build-dev:scripts 'build:**'",
"build-prod": "NETLIFY=true run-s build-prod:scripts 'build:**'", "clean-version-cache": "rm -f source/_data/versionCache.json",
"build-prod": "NETLIFY=true run-s clean-version-cache build-prod:scripts 'build:**'",
"build:sass": "sass --style=compressed ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css", "build:sass": "sass --style=compressed ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
"watch:sass": "sass --watch ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css", "watch:sass": "sass --watch ./source/assets/sass/sass.scss:./source/assets/dist/css/sass.css ./source/assets/sass/noscript.scss:./source/assets/dist/css/noscript.css",
"build-dev:scripts": "rollup -c", "build-dev:scripts": "rollup -c",

View File

@ -45,9 +45,6 @@ const spawn = (
* Retrieves cached version object from cache file. * Retrieves cached version object from cache file.
*/ */
const getCacheFile = async () => { const getCacheFile = async () => {
if (process.env.NETLIFY || process.env.REBUILD_VERSION_CACHE) {
return {};
}
let versionCache; let versionCache;
try { try {
const versionFile = await fs.readFile(VERSION_CACHE_PATH); const versionFile = await fs.readFile(VERSION_CACHE_PATH);