mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
desktop: enable regexp in sqlite
This commit is contained in:
71
.github/workflows/desktop.publish.yml
vendored
71
.github/workflows/desktop.publish.yml
vendored
@@ -232,7 +232,7 @@ jobs:
|
|||||||
xcrun altool --upload-package $package -t osx --apiKey $API_KEY_ID --apiIssuer $API_KEY_ISSUER_ID --apple-id ${{ steps.app_metadata.outputs.apple_app_id }} --bundle-id ${{ steps.app_metadata.outputs.app_bundle_id }} --bundle-short-version-string ${{ steps.app_metadata.outputs.app_version }} --bundle-version ${{ steps.app_metadata.outputs.bundle_version }}
|
xcrun altool --upload-package $package -t osx --apiKey $API_KEY_ID --apiIssuer $API_KEY_ISSUER_ID --apple-id ${{ steps.app_metadata.outputs.apple_app_id }} --bundle-id ${{ steps.app_metadata.outputs.app_bundle_id }} --bundle-short-version-string ${{ steps.app_metadata.outputs.app_version }} --bundle-version ${{ steps.app_metadata.outputs.bundle_version }}
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
build-linux:
|
build-linux-x64:
|
||||||
name: Build for Linux
|
name: Build for Linux
|
||||||
needs: build
|
needs: build
|
||||||
if: inputs.build-linux
|
if: inputs.build-linux
|
||||||
@@ -266,7 +266,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install sqlite-better-trigram for all arch
|
- name: Install sqlite-better-trigram for all arch
|
||||||
run: |
|
run: |
|
||||||
npm i --cpu arm64 sqlite-better-trigram
|
|
||||||
npm i --cpu x64 sqlite-better-trigram
|
npm i --cpu x64 sqlite-better-trigram
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
@@ -285,9 +284,9 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ ${{ inputs.publish-github }} == true ]; then
|
if [ ${{ inputs.publish-github }} == true ]; then
|
||||||
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 AppImage:arm64 -p always
|
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 -p always
|
||||||
else
|
else
|
||||||
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 AppImage:arm64 -p never
|
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 -p never
|
||||||
fi
|
fi
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
@@ -297,6 +296,70 @@ jobs:
|
|||||||
snapcraft upload --release=stable ./output/notesnook_linux_amd64.snap
|
snapcraft upload --release=stable ./output/notesnook_linux_amd64.snap
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
|
build-linux-arm64:
|
||||||
|
name: Build for Linux
|
||||||
|
needs: build
|
||||||
|
if: inputs.build-linux
|
||||||
|
runs-on: ubuntu-22.04-arm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: ./.github/actions/setup-node-with-cache
|
||||||
|
|
||||||
|
- name: Setup Snapcraft Auth
|
||||||
|
if: inputs.publish-snap
|
||||||
|
run: echo "SNAPCRAFT_STORE_CREDENTIALS=${{ secrets.snapcraft_token }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install Snapcraft
|
||||||
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
|
if: inputs.publish-snap
|
||||||
|
|
||||||
|
- name: Download build
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: ./apps/web/build
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||||
|
npm run bootstrap -- --scope=desktop
|
||||||
|
|
||||||
|
- name: Install sqlite-better-trigram for all arch
|
||||||
|
run: |
|
||||||
|
npm i --cpu arm64 sqlite-better-trigram
|
||||||
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
|
- name: Build Electron wrapper
|
||||||
|
run: npx nx run release --project @notesnook/desktop
|
||||||
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
|
- name: Build snap
|
||||||
|
if: inputs.publish-snap
|
||||||
|
run: |
|
||||||
|
yarn electron-builder --config=electron-builder.config.js --linux snap:arm64 -p never
|
||||||
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
|
- name: Build AppImage
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [ ${{ inputs.publish-github }} == true ]; then
|
||||||
|
yarn electron-builder --config=electron-builder.config.js --linux AppImage:arm64 -p always
|
||||||
|
else
|
||||||
|
yarn electron-builder --config=electron-builder.config.js --linux AppImage:arm64 -p never
|
||||||
|
fi
|
||||||
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
|
- name: Publish on Snapcraft
|
||||||
|
if: inputs.publish-snap
|
||||||
|
run: |
|
||||||
|
snapcraft upload --release=stable ./output/notesnook_linux_arm64.snap
|
||||||
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Build for Windows
|
name: Build for Windows
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
576
apps/desktop/package-lock.json
generated
576
apps/desktop/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -43,8 +43,7 @@ if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// temporary until there's support for prebuilt binaries for linux ARM
|
await patchBetterSQLite3();
|
||||||
if (os.platform() === "linux") await patchBetterSQLite3();
|
|
||||||
|
|
||||||
await fs.cp(path.join(webAppPath, "build"), path.join(root, "build"), {
|
await fs.cp(path.join(webAppPath, "build"), path.join(root, "build"), {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { readFile, writeFile } from "fs/promises";
|
import { readFile, rm, writeFile } from "fs/promises";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
|
|
||||||
@@ -34,12 +34,21 @@ export async function patchBetterSQLite3() {
|
|||||||
);
|
);
|
||||||
const json = JSON.parse(await readFile(jsonPath, "utf-8"));
|
const json = JSON.parse(await readFile(jsonPath, "utf-8"));
|
||||||
|
|
||||||
json.version = "11.6.1";
|
delete json.homepage;
|
||||||
json.homepage = "https://github.com/thecodrr/better-sqlite3-multiple-ciphers";
|
delete json.repository;
|
||||||
json.repository.url =
|
|
||||||
"git://github.com/thecodrr/better-sqlite3-multiple-ciphers.git";
|
|
||||||
|
|
||||||
await writeFile(jsonPath, JSON.stringify(json));
|
await writeFile(jsonPath, JSON.stringify(json));
|
||||||
|
|
||||||
|
await rm(
|
||||||
|
path.join(
|
||||||
|
__dirname,
|
||||||
|
"..",
|
||||||
|
"node_modules",
|
||||||
|
"better-sqlite3-multiple-ciphers",
|
||||||
|
"build"
|
||||||
|
),
|
||||||
|
{ force: true, recursive: true }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.argv[1] === __filename) {
|
if (process.argv[1] === __filename) {
|
||||||
|
|||||||
Reference in New Issue
Block a user