-
-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched to prebuild + prebuild-install
wip
- Loading branch information
1 parent
7674271
commit 6e06937
Showing
7 changed files
with
26 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ setup.sh | |
*.tgz | ||
package-lock.json | ||
yarn.lock | ||
prebuilds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
const binary = require('@mapbox/node-pre-gyp'); | ||
const path = require('path'); | ||
const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); | ||
const binding = require(binding_path); | ||
module.exports = exports = binding; | ||
module.exports = require('bindings')('node_sqlite3.node'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,12 @@ WORKDIR /usr/src/build | |
COPY . . | ||
RUN npm install --ignore-scripts | ||
|
||
# Workaround for https://github.com/mapbox/node-pre-gyp/issues/644 | ||
RUN cd node_modules/\@mapbox/node-pre-gyp \ | ||
&& npm install [email protected] \ | ||
&& sed -i -e s/\'fs/\'fs-extra/ -e s/fs\.renameSync/fs.moveSync/ ./lib/util/napi.js | ||
|
||
ENV CFLAGS="${CFLAGS:-} -include ../src/gcc-preinclude.h" | ||
ENV CXXFLAGS="${CXXFLAGS:-} -include ../src/gcc-preinclude.h" | ||
RUN npx node-pre-gyp configure | ||
RUN npx node-pre-gyp build | ||
RUN npm run prebuild | ||
|
||
RUN if case $VARIANT in "alpine"*) false;; *) true;; esac; then ldd lib/binding/*/node_sqlite3.node; nm lib/binding/*/node_sqlite3.node | grep \"GLIBC_\" | c++filt || true ; fi | ||
RUN if case $VARIANT in "alpine"*) false;; *) true;; esac; then ldd build/**/node_sqlite3.node; nm build/**/node_sqlite3.node | grep \"GLIBC_\" | c++filt || true ; fi | ||
|
||
RUN npm run test | ||
RUN npx node-pre-gyp package | ||
|
||
CMD ["sh"] |