Skip to content

Commit

Permalink
[build] workaround to fix windows native module build
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbotris committed Mar 23, 2022
1 parent 093f60b commit bfa2a08
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Desktop.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ pipeline {
NODE_PATH = '/opt/node-v16.3.0-linux-x64/bin'
NODE_MAC_PATH = '/usr/local/opt/node@16/bin/'
VERSION = sh(returnStdout: true, script: "${NODE_PATH}/node -p -e \"require('./package.json').version\" | tr -d \"\n\"")

// Needed for our workaround for the windows build
BETTER_SQLITE3_VERSION = sh(returnStdout: true, script: "${NODE_PATH}/node -p -e \"require('./package.json').dependencies['better-sqlite3']\" | tr -d '\n'")
}
options {
preserveStashes()
Expand Down Expand Up @@ -58,11 +55,9 @@ pipeline {

// FIXME this is a workaround for https://github.com/tutao/tutanota/issues/3982
// The hash generated by npm on windows is different to the one
// So we just install better-sqlite3 using the version referenced in package.json
// And then run npm ci

bat "npm install -S ${BETTER_SQLITE3_VERSION}"
bat 'npm ci'
// So we just don't install with npm ci
bat 'del package-lock.json'
bat "npm install"

bat "node buildSrc\\nativeLibraryProvider.js keytar --force-rebuild --root-dir ${WORKSPACE}"
bat "node buildSrc\\nativeLibraryProvider.js better-sqlite3 --copy-target better_sqlite3 --force-rebuild --root-dir ${WORKSPACE}"
Expand Down

0 comments on commit bfa2a08

Please sign in to comment.