-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-shell-odd): create node layer for ODD (#11852)
- Loading branch information
Showing
61 changed files
with
4,097 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# lib is compiled by babel | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# opentrons app desktop shell makefile | ||
|
||
include ../scripts/push.mk | ||
|
||
# using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update | ||
SHELL := bash | ||
|
||
# add node_modules/.bin to PATH | ||
PATH := $(shell cd .. && yarn bin):$(PATH) | ||
|
||
# dev server port | ||
PORT ?= 8090 | ||
|
||
# dep directories for production build | ||
# TODO(mc, 2018-08-07): figure out a better way to do this | ||
ui_dir := ../app | ||
|
||
# cross-platform noop command | ||
noop := cd . | ||
|
||
# Other SSH args for robots | ||
ssh_opts ?= $(default_ssh_opts) | ||
|
||
builder := yarn electron-builder \ | ||
--config electron-builder.config.js \ | ||
--publish never | ||
|
||
electron := yarn electron . \ | ||
--devtools \ | ||
--log.level.console="debug" \ | ||
--disable_ui.webPreferences.webSecurity \ | ||
--ui.url.protocol="http:" \ | ||
--ui.url.path="localhost:$(PORT)" \ | ||
|
||
# standard targets | ||
##################################################################### | ||
|
||
.PHONY: all | ||
all: package | ||
|
||
.PHONY: setup | ||
# must be wrapped in yarn run otherwise `prebuild-install` will fail silently | ||
# due to how `electron-rebuild` calls `prebuild-install` | ||
setup: | ||
yarn rebuild | ||
|
||
.PHONY: clean | ||
clean: | ||
shx rm -rf lib dist | ||
|
||
# artifacts | ||
##################################################################### | ||
|
||
.PHONY: lib | ||
lib: export NODE_ENV := production | ||
lib: | ||
OPENTRONS_PROJECT=ot3 webpack --profile | ||
|
||
.PHONY: deps | ||
deps: | ||
$(MAKE) -C $(ui_dir) OPENTRONS_PROJECT=ot3 | ||
|
||
.PHONY: package-deps | ||
package-deps: clean lib deps | ||
|
||
.PHONY: dist-ot3 | ||
dist-ot3: package-deps | ||
NO_USB_DETECTION=true OT_APP_DEPLOY_BUCKET=opentrons-app OT_APP_DEPLOY_FOLDER=builds OPENTRONS_PROJECT=ot3 $(builder) --linux --arm64 | ||
|
||
.PHONY: push-ot3 | ||
push-ot3: dist-ot3 | ||
ssh $(ssh_opts) root@$(host) "mount -o remount,rw / && systemctl stop opentrons-robot-app && rm -rf /opt/opentrons-app && mkdir -p /opt/opentrons-app" | ||
scp -r $(ssh_opts) ./dist/linux-arm64-unpacked/* root@$(host):/opt/opentrons-app | ||
ssh $(ssh_opts) root@$(host) "systemctl start opentrons-robot-app && mount -o remount,ro /" | ||
|
||
# development | ||
##################################################################### | ||
|
||
.PHONY: dev | ||
dev: export NODE_ENV := development | ||
dev: | ||
webpack | ||
$(electron) |
Oops, something went wrong.