Skip to content

Commit 04e13e2

Browse files
committedJan 7, 2020
added correct deploy key and cleaned up
1 parent 883fd0b commit 04e13e2

File tree

5 files changed

+60
-47
lines changed

5 files changed

+60
-47
lines changed
 

‎.travis.yml

+16-17
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ language: node_js
22
sudo: false
33
matrix:
44
include:
5-
# linux builds
65
- name: "Linux - Node 8"
76
os: linux
87
node_js: "8"
9-
env:
10-
- CXX="g++-4.9"
8+
env:
9+
- CXX=g++-4.9
1110
- CC=gcc-4.9
1211
addons:
1312
apt:
@@ -19,8 +18,8 @@ matrix:
1918
- name: "Linux - Node 10"
2019
os: linux
2120
node_js: "10"
22-
env:
23-
- CXX="g++-4.9"
21+
env:
22+
- CXX=g++-4.9
2423
- CC=gcc-4.9
2524
addons:
2625
apt:
@@ -32,8 +31,8 @@ matrix:
3231
- name: "Linux - Node 12"
3332
os: linux
3433
node_js: "12"
35-
env:
36-
- CXX="g++-4.9"
34+
env:
35+
- CXX=g++-4.9
3736
- CC=gcc-4.9
3837
addons:
3938
apt:
@@ -47,39 +46,39 @@ matrix:
4746
node_js: "8"
4847
osx_image: xcode11
4948
compiler: clang
50-
env:
49+
env:
5150
- CXX=g++
5251
- CC=gcc
5352
- name: "OS X - Node 10"
5453
os: osx
5554
node_js: "10"
5655
osx_image: xcode11
5756
compiler: clang
58-
env:
57+
env:
5958
- CXX=g++
6059
- CC=gcc
6160
- name: "OS X - Node 12"
6261
os: osx
6362
node_js: "12"
6463
osx_image: xcode11
6564
compiler: clang
66-
env:
65+
env:
6766
- CXX=g++
6867
- CC=gcc
6968
before_script:
70-
- npm run install-debug
69+
- npm run build-debug
7170
before_deploy:
72-
- npm install
73-
- npm run prebuild
74-
- npm run prebuild-electron
71+
- npm run build-release
72+
- $(npm bin)/prebuild -r node -t 8.0.0 -t 10.0.0 -t 12.0.0 --include-regex 'better_sqlite3.node$'
73+
- $(npm bin)/prebuild -r electron -t 2.0.0 -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 --include-regex 'better_sqlite3.node$'
7574
deploy:
7675
provider: releases
7776
api_key:
78-
secure: DU537mo7UzDlB0tgd/CX6VDwi2tE1KuBfEEO5+YBD9EfPNPbgs8NPOxdpBOhJIuuclHqouHF9JQ+L4plaQvRqNOoS2BT7fuftKfgzDamBchHgW9xi3TkF03YG5EFDgnb8NeAW2Ke5sABAS8dep3JL/AAeiQQ/SWDZAlhosW3OmGCDT8pCeV5nLQ/wwf0WMkkeEXCvJ6iA16SLf7FknNPdWU213noB2bHgLaku7Ozxt6256ntuBARABDZj6zgLPTCl7AOu+CjhIRCg/ogdyY6C8qWkBAQt97Rdz7wSbE7ub/AdOcdR2SynG6NeuPIxojT9Iy3jpYuULF9dJo+NwsPvBtTES7FS4LtNDglunQG98VT1A1rc+LbYBLxWELe9usQO3i1dDvf/KOUMOt5vLBpiffZq34rMnNsAlZepmyYLsp9Ui212jHZhcGPk8vFqX0BCyJUN6wzyp6KRGCRYInbKMJJoJyrYUk2AWoaxojdQf/Ha1Kb2xJfCep+Ny6nI9oyGFh8P937/6wjtLa8Drgrt15o5kkaUR5HluEBINgrYj/3VNgZkZWX1YG2eW3HiOylU/aBtrpKM7n4FYJfAiqAJbZ7FkK+Lk65sdLit0wrvt+8EO+GG8RUreXSf21iJmvjX/A106cGCpiC4AKG1drJjjxbCi/iTRid/+Aldq98k5A=
77+
secure: cNaoDCeoEEOM72fiOEMMOIga0gyBBTecHOszynyl8wm+bIwHQEx5kN9Bt3HpBYHL3mKw9D5a7c2q5lX7uPIAykdw8daBukTDjty1m+mIqji6ezA7JZTMB5jLSPbVazxHLcU+Wyq9MJeGv4qx9vPZrdA6b+ad8OG0ORVYFL8OX1AmQ64BMqN7nJduCr6ajEPPA4DmbAVTRHl/oswxtyjPseqVxV/Hw0UJKLyCSDPlkFRC2rOXvSXCU/MpluYCKhkB9w0GaY1vLvaBAsoNVq/uEW21YXs9WgN8kimBgvEdNQE+NLTynxi7lS/xcKKQoJhhPR7OFsdCkxSHmoWCIEaiz8E+Y45y1uW4mvCZ1lCHHp8iLUggjYXyim7rlyuu3DuX4A8HWVmI0BZnp3TyE/bQI2+PGd8ie0LaxrK5UPl0qTEEXnzxC5qO8uk6MkEqjbBHY7mvdHevEwCz67ACAKAYAMwla5SWIPPj9upFthi+GMupdkn8efedu/2D45Pl0lZZeC4NID7RGXKLpYB1XfF2sMbL2o5bxqzJjMUGAatK/4OS8oFaKVcP0ovx7GHKJ8KKJo0pdXpsyyOZpcU+uYzA9eqBSA82rvSBrdWqrfXsGhl6FLVSP4BuRj9KlQG82yPlUuyjJT6MZZSBAWicDHItmK8f/R7G84nkBY2QqUYwCWY=
7978
file: prebuilds/*
8079
file_glob: true
8180
skip_cleanup: true
8281
on:
83-
repo: danielbarela/better-sqlite3
82+
repo: JoshuaWise/better-sqlite3
8483
tags: true
85-
node_js: "10"
84+
node_js: "12"

‎deps/sqlite3.gyp

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
'-std=c99',
4949
'-Wno-unused-function',
5050
'-Wno-sign-compare',
51+
'-Wno-implicit-fallthrough',
52+
'-Wno-cast-function-type',
53+
'-Wno-type-limits',
5154
],
5255
'xcode_settings': {
5356
'OTHER_CFLAGS': [
@@ -56,6 +59,9 @@
5659
'WARNING_CFLAGS': [
5760
'-Wno-unused-function',
5861
'-Wno-sign-compare',
62+
'-Wno-implicit-fallthrough',
63+
'-Wno-cast-function-type',
64+
'-Wno-type-limits',
5965
],
6066
},
6167
'conditions': [['sqlite3 == ""', {

‎package.json

+11-12
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,31 @@
1010
"url": "git://github.com/JoshuaWise/better-sqlite3.git"
1111
},
1212
"dependencies": {
13-
"bindings": "1.5.0",
13+
"bindings": "^1.5.0",
1414
"integer": "^2.1.0",
15-
"tar": "^4.4.10",
1615
"prebuild-install": "^5.3.2",
17-
"prebuild": "^9.1.1"
16+
"tar": "4.4.10"
1817
},
1918
"devDependencies": {
2019
"chai": "^4.2.0",
2120
"cli-color": "^1.4.0",
2221
"fs-extra": "^8.1.0",
2322
"mocha": "^6.2.0",
2423
"nodemark": "^0.3.0",
24+
"prebuild": "^9.1.1",
2525
"sqlite": "^3.0.3"
2626
},
2727
"scripts": {
28-
"install": "prebuild-install || node-gyp rebuild",
29-
"download": "sh ./deps/download.sh",
30-
"lzz": "lzz -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz",
31-
"prepublishOnly": "npm run lzz",
32-
"install-debug": "node-gyp rebuild --debug",
33-
"rebuild": "npm run lzz && node-gyp rebuild",
34-
"rebuild-debug": "npm run lzz && node-gyp rebuild --debug",
28+
"install": "prebuild-install || npm run build-release",
29+
"build-release": "node-gyp rebuild --release",
30+
"build-debug": "node-gyp rebuild --debug",
31+
"rebuild-release": "npm run lzz && npm run build-release",
32+
"rebuild-debug": "npm run lzz && npm run build-debug",
3533
"test": "mocha --exit --slow=75 --timeout=5000",
3634
"benchmark": "node benchmark",
37-
"prebuild-electron": "prebuild -r electron -t 2.0.0 -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 --include-regex 'better_sqlite3.node$'",
38-
"prebuild": "prebuild -r node -t 8.0.0 -t 10.0.0 -t 12.0.0 --include-regex 'better_sqlite3.node$'"
35+
"download": "sh ./deps/download.sh",
36+
"lzz": "lzz -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz",
37+
"prepublishOnly": "npm run lzz"
3938
},
4039
"license": "MIT",
4140
"keywords": [

‎test/34.database.load-extension.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
'use strict';
2+
const fs = require('fs');
3+
const path = require('path');
24
const Database = require('../.');
35

46
util.describeUnix('Database#loadExtension()', function () {
5-
const releaseFilepath = require('path').join(__dirname, '..', 'build', 'Release', 'test_extension.node');
6-
const debugFilepath = require('path').join(__dirname, '..', 'build', 'Debug', 'test_extension.node');
77
let filepath;
8-
try {
9-
const fs = require('fs');
10-
fs.accessSync(releaseFilepath, fs.constants.F_OK);
11-
filepath = releaseFilepath;
12-
} catch (e) {
13-
filepath = debugFilepath;
14-
}
8+
before(function () {
9+
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node');
10+
const debugFilepath = path.join(__dirname, '..', 'build', 'Debug', 'test_extension.node');
11+
try {
12+
fs.accessSync(releaseFilepath);
13+
filepath = releaseFilepath;
14+
} catch (_) {
15+
fs.accessSync(debugFilepath);
16+
filepath = debugFilepath;
17+
}
18+
});
1519
beforeEach(function () {
1620
this.db = new Database(util.next());
1721
});

‎test/42.integrity.js

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'use strict';
2+
const fs = require('fs');
3+
const path = require('path');
24
const Database = require('../.');
35

46
describe('integrity checks', function () {
@@ -166,16 +168,19 @@ describe('integrity checks', function () {
166168
});
167169

168170
util.describeUnix('Database#loadExtension()', function () {
169-
const releaseFilepath = require('path').join(__dirname, '..', 'build', 'Release', 'test_extension.node');
170-
const debugFilepath = require('path').join(__dirname, '..', 'build', 'Debug', 'test_extension.node');
171171
let filepath;
172-
try {
173-
const fs = require('fs');
174-
fs.accessSync(releaseFilepath, fs.constants.F_OK);
175-
filepath = releaseFilepath;
176-
} catch (e) {
177-
filepath = debugFilepath;
178-
}
172+
before(function () {
173+
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node');
174+
const debugFilepath = path.join(__dirname, '..', 'build', 'Debug', 'test_extension.node');
175+
try {
176+
fs.accessSync(releaseFilepath);
177+
filepath = releaseFilepath;
178+
} catch (_) {
179+
fs.accessSync(debugFilepath);
180+
filepath = debugFilepath;
181+
}
182+
});
183+
179184
specify('while iterating (blocked)', function () {
180185
whileIterating(this, blocked(() => this.db.loadExtension(filepath)));
181186
normally(allowed(() => this.db.loadExtension(filepath)));

0 commit comments

Comments
 (0)
Please sign in to comment.