Skip to content

Commit

Permalink
Merge branch 'oscar/ci-scripts'
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Jul 31, 2024
2 parents 515a451 + 268a88f commit 6caedb6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Turn off addons
run: |
node ./scripts/turnOffEverything.js
- name: Setup
uses: ./.github/actions/setup

Expand Down Expand Up @@ -78,6 +82,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Turn off addons
run: |
node ./scripts/turnOffEverything.js
- name: Setup
uses: ./.github/actions/setup

Expand Down
19 changes: 19 additions & 0 deletions scripts/turnOffEverything.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const fs = require('fs');

console.log('Current working directory:', process.cwd());

// Read the package.json file
const packageJson = JSON.parse(fs.readFileSync('./example/package.json'));

// Modify the op-sqlite.sqlcipher key to true
packageJson['op-sqlite']['libsql'] = false;
packageJson['op-sqlite']['sqlcipher'] = false;
packageJson['op-sqlite']['crsqlite'] = false;

// Save the updated package.json file
fs.writeFileSync(
'./example/package.json',
JSON.stringify(packageJson, null, 2)
);

console.log('package.json updated successfully!');
1 change: 1 addition & 0 deletions scripts/turnOnLibsql.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const packageJson = JSON.parse(fs.readFileSync('./example/package.json'));

// Modify the op-sqlite.sqlcipher key to true
packageJson['op-sqlite']['libsql'] = true;
packageJson['op-sqlite']['sqlcipher'] = false;

// Save the updated package.json file
fs.writeFileSync(
Expand Down
1 change: 1 addition & 0 deletions scripts/turnOnSQLCipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const packageJson = JSON.parse(fs.readFileSync('./example/package.json'));

// Modify the op-sqlite.sqlcipher key to true
packageJson['op-sqlite']['sqlcipher'] = true;
packageJson['op-sqlite']['libsql'] = false;

// Save the updated package.json file
fs.writeFileSync(
Expand Down

0 comments on commit 6caedb6

Please sign in to comment.