Skip to content

Commit

Permalink
feat(algolia agent): provide an algolia agent when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Stanislawski committed Feb 6, 2017
1 parent d70ef46 commit ef604e1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ if [[ -n $(git status --porcelain) ]]; then
error_exit "Release: Working tree is not clean (git status)"
fi

echo "module.exports = \"${nextVersion}\";" > version.js
git add version.js

yarn &&
mversion $nextVersion &&
yarn build &&
Expand Down
2 changes: 2 additions & 0 deletions src/sources/hits.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use strict';

var _ = require('../common/utils.js');
var version = require('../../version.js');

module.exports = function search(index, params) {
params.additionalUA = 'autocomplete.js ' + version;
return sourceFn;

function sourceFn(query, cb) {
Expand Down
2 changes: 2 additions & 0 deletions src/sources/popularIn.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use strict';

var _ = require('../common/utils.js');
var version = require('../../version.js');

module.exports = function popularIn(index, params, details, options) {
params.additionalUA = 'autocomplete.js ' + version;
if (!details.source) {
return _.error("Missing 'source' key");
}
Expand Down
1 change: 1 addition & 0 deletions version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "3.4.2";

0 comments on commit ef604e1

Please sign in to comment.