Skip to content

Commit

Permalink
fix: fixed auto-update
Browse files Browse the repository at this point in the history
Fixed Mimic OSX auto-update by signing application correctly

fix #13
  • Loading branch information
volodymyr-ladnik-ck committed Oct 25, 2018
1 parent fc85f4d commit 52c9038
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
30 changes: 12 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ jobs:
test:
environment:
CC_TEST_REPORTER_ID: 4bb367d28fc1fbce41a9215c405f35f84054ce5119f8b162a54cd8d9b244a942
working_directory: ~/repo
docker:
- image: electronuserland/builder:wine
macos:
xcode: "10.0.0"
working_directory: /Users/distiller/project
steps:
- checkout
# Restore node_modules
Expand All @@ -23,7 +23,7 @@ jobs:
- run:
name: Run tests with JUnit and CodeClimate reporters
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
yarn test:ci
Expand All @@ -35,15 +35,15 @@ jobs:
- store_artifacts:
path: reports/junit
- persist_to_workspace:
root: ~/repo
root: /Users/distiller/project
paths: .
publish:
working_directory: ~/repo
docker:
- image: electronuserland/builder:wine
macos:
xcode: "10.0.0"
working_directory: /Users/distiller/project
steps:
- attach_workspace:
at: ~/repo
at: /Users/distiller/project
- run:
name: Authenticate with registry
command: echo "//registry.yarnpkg.com/:_authToken=$npm_TOKEN" > ~/.npmrc
Expand All @@ -58,19 +58,13 @@ jobs:
command: yarn dist:all
environment:
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: "true"
ELECTRON_CACHE: /root/.cache/electron
ELECTRON_BUILDER_CACHE: /root/.cache/electron-builder
ELECTRON_CACHE: /Users/distiller/cache/electron
ELECTRON_BUILDER_CACHE: /Users/distiller/cache/electron-builder
# Save cache
- save_cache:
key: electron-prebuilt
paths:
- /root/.cache/
- run:
name: Upload artifacts to Release page
command: |
curl -L https://github.com/tcnksm/ghr/releases/download/v0.12.0/ghr_v0.12.0_linux_386.tar.gz | tar xzO *ghr > ghr
chmod +x ./ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./dist/{Mimic,latest}*
- /Users/distiller/cache
- store_artifacts:
path: dist

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.11.2
10.11.0
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@creditkarma/mimic-graphql": "2.0.2",
"@creditkarma/mimic-rest": "2.0.2",
"@creditkarma/mimic-thrift": "2.0.2",
"electron-log": "^2.2.17",
"electron-updater": "^3.0.3",
"source-map-support": "^0.5.0"
},
Expand Down Expand Up @@ -100,16 +101,15 @@
}
},
"build": {
"publish": {
"provider": "github"
},
"appId": "com.creditkarma.mimic",
"productName": "Mimic",
"mac": {
"category": "public.app-category.developer-tools",
"target": ["zip"]
"category": "public.app-category.developer-tools"
}
},
"publish": {
"provider": "github"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
Expand Down
3 changes: 3 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { app, BrowserWindow, Menu } from "electron";
import * as log from "electron-log";
import { autoUpdater } from "electron-updater";

import "./dispatcher";
Expand Down Expand Up @@ -69,6 +70,8 @@ app.on("activate", () => {
app.on("ready", () => {
mainWindow = createMainWindow();
Menu.setApplicationMenu(menu);
log.transports.file.level = "debug";
autoUpdater.logger = log;
autoUpdater.checkForUpdatesAndNotify();
process.env.MIMIC_VERSION = app.getVersion();
});
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3714,6 +3714,10 @@ electron-is-dev@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-0.3.0.tgz#14e6fda5c68e9e4ecbeff9ccf037cbd7c05c5afe"

electron-log@^2.2.17:
version "2.2.17"
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-2.2.17.tgz#e71e2ebb949fc96ded7cdb99eeee7202e48981d2"

electron-osx-sign@0.4.10:
version "0.4.10"
resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz#be4f3b89b2a75a1dc5f1e7249081ab2929ca3a26"
Expand Down

0 comments on commit 52c9038

Please sign in to comment.