Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 21, 2024
1 parent 17f0c6f commit a3105be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true
run: |
yarn release
14 changes: 9 additions & 5 deletions scripts/delete-playwright-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
* these changes would not be reflected in the test-runner. This script (hooked to nodemon) makes sure that
* whenever you change the csf-playwright-plugin.ts file, the cache is cleared and you actually get your changes.
*/
if (process.platform !== 'darwin') {
throw new Error('This script only works on macOS.');
}

const fs = require('fs').promises;
const path = require('path');

Expand Down Expand Up @@ -62,6 +58,10 @@ async function findPlaywrightTransformCacheDir(dirPath) {
// This is the pattern used by Playwright: /var/folders/{some-hash}/{some-other-hash}/T/playwright-transform-cache-501
// it will look like this /var/folders/sv/lg8lnv0s4gg6_rt7s6cd52qr0000gn/T/playwright-transform-cache-501
const main = async () => {
if (process.platform !== 'darwin') {
throw new Error('This script only works on macOS.');
}

let playwrightTransformPath = await getCachedPath();

if (!playwrightTransformPath) {
Expand All @@ -81,4 +81,8 @@ const main = async () => {
}
};

main();
console.log(process.env.CI);

if (process.env.CI === undefined) {
main();
}

0 comments on commit a3105be

Please sign in to comment.