Skip to content

Commit 10c63e2

Browse files
committed
Merge branch 'dev_producer_testing_and_fixes' into feature/add-basic-semaphore-setup
2 parents 256cea7 + de06e49 commit 10c63e2

File tree

8 files changed

+23
-15
lines changed

8 files changed

+23
-15
lines changed

.semaphore/semaphore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,4 @@ blocks:
206206
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
207207
- npx node-pre-gyp package
208208
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
209-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
209+
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

binding.gyp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
# may be redefined in command line on configuration stage
44
# "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})"
55
"BUILD_LIBRDKAFKA%": "<!(node ./util/get-env.js BUILD_LIBRDKAFKA 1)",
6+
"CKJS_LINKING%": "<!(node ./util/get-env.js CKJS_LINKING static)",
67
},
78
"targets": [
89
{
9-
"target_name": "node-librdkafka",
10+
"target_name": "confluent-kafka-js",
1011
'sources': [
1112
'src/binding.cc',
1213
'src/callbacks.cc',
@@ -85,7 +86,17 @@
8586
],
8687
'conditions': [
8788
[
88-
'OS=="linux"',
89+
['OS=="linux"', 'CKJS_LINKING="dynamic"'],
90+
{
91+
"libraries": [
92+
"../build/deps/librdkafka.so",
93+
"../build/deps/librdkafka++.so",
94+
"-Wl,-rpath='$$ORIGIN/../deps'",
95+
],
96+
}
97+
],
98+
[
99+
['OS=="linux"', 'CKJS_LINKING!="dynamic"'],
89100
{
90101
"libraries": [
91102
"../build/deps/librdkafka-static.a",

deps/librdkafka.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"librdkafka/config.h",
2727
],
2828
"action": [
29-
"make", "-C", "librdkafka", "libs", "install"
29+
"make", "-j5", "-C", "librdkafka", "libs", "install"
3030
],
3131
"conditions": [
3232
[

librdkafka.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var kafka = require('bindings')('node-librdkafka');
10+
var kafka = require('bindings')('confluent-kafka-js');
1111

1212
module.exports = kafka;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test:types": "tsc -p ."
1515
},
1616
"binary": {
17-
"module_name": "node-librdkafka",
17+
"module_name": "confluent-kafka-js",
1818
"module_path": "./build/{configuration}/",
1919
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{libc}-{arch}.tar.gz",
2020
"host": "https://github.com/confluentinc/confluent-kafka-js/releases/download/",

test/binding.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var addon = require('bindings')('node-librdkafka');
10+
var addon = require('bindings')('confluent-kafka-js');
1111
var t = require('assert');
1212

1313
var consumerConfig = {

test/consumer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var addon = require('bindings')('node-librdkafka');
10+
var addon = require('bindings')('confluent-kafka-js');
1111
var t = require('assert');
1212

1313
var client;

util/configure.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ var path = require('path');
77

88
var baseDir = path.resolve(__dirname, '../');
99
var releaseDir = path.join(baseDir, 'build', 'deps');
10-
// var command = './configure --install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi';
11-
// if (!process.env.IS_ON_CI) {
12-
var command = './configure --install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi --prefix=' + releaseDir + ' --libdir=' + releaseDir;
13-
// }
14-
1510
var isWin = /^win/.test(process.platform);
1611

1712
// Skip running this if we are running on a windows system
@@ -23,8 +18,10 @@ if (isWin) {
2318
var childProcess = require('child_process');
2419

2520
try {
26-
process.stderr.write("Running: " + command + 'on working directory = ' + baseDir + '\n');
27-
childProcess.execSync(command, {
21+
let opts = '--install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi';
22+
if (process.env['CKJS_LINKING'] === 'dynamic')
23+
opts = '';
24+
childProcess.execSync(`./configure ${opts} --prefix=${releaseDir} --libdir=${releaseDir}`, {
2825
cwd: baseDir,
2926
stdio: [0,1,2]
3027
});

0 commit comments

Comments
 (0)