Skip to content

Commit

Permalink
Merge pull request #27 from ringcentral/TryFixGithubAction
Browse files Browse the repository at this point in the history
Try fix GitHub action
  • Loading branch information
DaKingKong authored Jun 28, 2024
2 parents 69539b6 + 5ebe0d9 commit f2e1247
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ jobs:
with:
node-version: '14'
registry-url: https://registry.npmjs.org/
- run: echo "Start"
- run: npm i
- run: npm run test-coverage
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ const contactCore = require('./core/contact');
const authCore = require('./core/auth');
const axios = require('axios');
const analytics = require('./lib/analytics');
let package = null;
let packageJson = null;
try {
package = require('./package.json');
packageJson = require('./package.json');
}
catch (e) {
package = require('../package.json');
packageJson = require('../package.json');
}

axios.defaults.headers.common['Unified-CRM-Extension-Version'] = packageJson.version;
Expand Down
8 changes: 4 additions & 4 deletions src/lib/analytics.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const Mixpanel = require('mixpanel');
const parser = require('ua-parser-js');
let package = null;
let packageJson = null;
try {
package = require('../package.json');
packageJson = require('../package.json');
}
catch (e) {
package = require('../../package.json');
packageJson = require('../../package.json');
}
const appName = 'RingCentral CRM Extension';
const version = package.version;
const version = packageJson.version;
let mixpanel = null;

exports.init = function init() {
Expand Down

0 comments on commit f2e1247

Please sign in to comment.