Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(app-shell): Remove unused app-shell files (auto-update prep) #868

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Feb 19, 2018

overview

In preparation for feature work on #810, this PR removes a bunch of unused legacy app-shell code related to user settings, updates, and the menu bar.

changelog

  • Chore: Removed unused app-shell code
  • Refactor: Fixed menu bar to follow OS conventions
  • Chore: Switched Windows build from Squirrel to NSIS

review requests

Please make sure the make -C app-shell dist-YOUR_OS_HERE tasks still work on your machine

@codecov
Copy link

codecov bot commented Feb 19, 2018

Codecov Report

Merging #868 into v3a will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              v3a     #868   +/-   ##
=======================================
  Coverage   69.92%   69.92%           
=======================================
  Files         197      197           
  Lines        6385     6385           
  Branches      203      203           
=======================================
  Hits         4465     4465           
  Misses       1850     1850           
  Partials       70       70

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 572534e...6c35e88. Read the comment docs.

Copy link
Contributor

@btmorr btmorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏷

{
label: 'Report an Issue',
click: () => {
require('electron').shell.openExternal(pkg.bugs.url)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work in production builds: electron-userland/electron-builder#2606

{
label: 'Learn More',
click: () => {
require('electron').shell.openExternal('https://opentrons.com/')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pkg.homepage?

@mcous mcous merged commit 03426c7 into v3a Feb 19, 2018
@mcous mcous deleted the app-shell_cleanup branch February 19, 2018 17:28
@IanLondon
Copy link
Contributor

make[1]: Leaving directory '/home/ian/opentrons/github/opentrons/app'
electron-builder --linux --publish never
  • electron-builder version=19.52.1
  • loaded configuration file=/home/ian/opentrons/github/opentrons/app-shell/electron-builder.json
  • writing effective config file=dist/electron-builder.yaml
  • no native production dependencies
  • packaging       platform=linux arch=x64 electron=1.6.11 appOutDir=dist/linux-unpacked
Error: Env OT_TIME_SUFFIX is not defined
    at pattern.replace (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:459:21)
    at String.replace (<anonymous>)
    at LinuxPackager.expandMacro (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:432:20)
    at LinuxPackager.computeArtifactName (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:413:17)
    at LinuxPackager.expandArtifactNamePattern (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:391:17)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/targets/fpm.ts:107:63
    at Generator.next (<anonymous>)
From previous event:
    at FpmTarget.build (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/out/targets/fpm.js:278:11)
    at default.each.it (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:122:89)
From previous event:
    at taskManager.addTask.default.map.then (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:122:37)
From previous event:
    at LinuxPackager.packageInDistributableFormat (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:122:10)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/platformPackager.ts:116:10
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at LinuxPackager.pack (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/out/platformPackager.js:195:11)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/packager.ts:355:24
    at Generator.next (<anonymous>)
    at xfs.stat (/home/ian/opentrons/github/opentrons/app-shell/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
    at Packager.doBuild (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/out/packager.js:419:11)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/packager.ts:299:52
    at Generator.next (<anonymous>)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/graceful-fs/graceful-fs.js:99:16
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/graceful-fs/graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
    at Packager._build (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/out/packager.js:363:11)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/src/packager.ts:261:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at Packager.build (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder-lib/out/packager.js:319:11)
    at /home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/src/builder.ts:310:40
    at Generator.next (<anonymous>)
From previous event:
    at _build (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/out/builder.js:61:21)
    at build (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/src/builder.ts:280:10)
    at then (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at Object.args [as handler] (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (/home/ian/opentrons/github/opentrons/app-shell/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/home/ian/opentrons/github/opentrons/app-shell/node_modules/yargs/yargs.js:1041:24)
    at Object.get [as argv] (/home/ian/opentrons/github/opentrons/app-shell/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/home/ian/opentrons/github/opentrons/app-shell/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3


   ╭─────────────────────────────────────────────────╮
   │                                                 │
   │       Update available 19.52.1 → 20.0.6         │
   │   Run yarn upgrade electron-builder to update   │
   │                                                 │
   ╰─────────────────────────────────────────────────╯

Makefile:55: recipe for target 'dist-linux' failed
make: *** [dist-linux] Error 1

@mcous
Copy link
Contributor Author

mcous commented Feb 19, 2018

Sorry y'all, forgot to call that out. The dist-* tasks need the following environment variables defined to name the artifact. This is a legacy process that will be revamped (and properly documented) in the next app-shell PR.

export OT_TIME_SUFFIX=-some_time
export OT_BRANCH_SUFFIX=-some_branch
export OT_COMMIT_SUFFIX=-some_commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project chore refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants