Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Enrici committed Nov 15, 2018
2 parents fbd921c + 0d6e0fa commit 015f7b5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dev": "concurrently \"BROWSER=none npm start\" \"wait-on $npm_package_config_cra_dev_serv && ELECTRON_START_URL=$npm_package_config_cra_dev_serv electron .\"",
"dist": "react-scripts build && build --c.extraMetadata.main=build/electron.js",
"dist:mac": "./sign/mac.sh",
"dist:win": ".\\sign\\win.bat",
"eject": "react-scripts eject",
"lint": "eslint --cache public && eslint --cache src",
"pack": "build --c.extraMetadata.main=build/electron.js",
Expand Down
12 changes: 7 additions & 5 deletions public/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@ const { noop } = require('lodash')
const settings = require('electron-settings')
const isDev = require('electron-is-dev')

const visitor = ua(settings.get('app.trackingId'))
let visitor
const analytics = {}

visitor.set('ds', 'app')
visitor.set('an', app.getName())
visitor.set('av', app.getVersion())

analytics.screenview = function (...args) {
if (!visitor) return
visitor.screenview(...args).send()
}

analytics.event = function (...args) {
if (!visitor) return
visitor.event(...args).send()
}

analytics.init = function (userAgent) {
visitor = ua(settings.get('app.trackingId'))
visitor.set('ds', 'app')
visitor.set('an', app.getName())
visitor.set('av', app.getVersion())
visitor.set('ua', userAgent)
analytics.event('App', 'App initiated')
}
Expand Down
10 changes: 10 additions & 0 deletions sign/win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
echo Building and signing application for Windows

SET CSC_LINK=as.p12

set /p PASSWORD="Insert the certificate password and press enter: "

SET CSC_KEY_PASSWORD=%PASSWORD%

npm run dist

0 comments on commit 015f7b5

Please sign in to comment.