diff --git a/.circleci/config.yml b/.circleci/config.yml index d46698f..f85c6c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.nvmrc b/.nvmrc index ef9226d..68d1958 100755 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.11.2 \ No newline at end of file +10.11.0 \ No newline at end of file diff --git a/package.json b/package.json index bfa63a2..53adacf 100755 --- a/package.json +++ b/package.json @@ -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" }, @@ -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" diff --git a/src/main/index.ts b/src/main/index.ts index 63c40de..fb655ad 100755 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,4 +1,5 @@ import { app, BrowserWindow, Menu } from "electron"; +import * as log from "electron-log"; import { autoUpdater } from "electron-updater"; import "./dispatcher"; @@ -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(); }); diff --git a/yarn.lock b/yarn.lock index aa6e3cf..381d136 100755 --- a/yarn.lock +++ b/yarn.lock @@ -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"