Explorar o código

Normalizing the app

luis %!s(int64=6) %!d(string=hai) anos
pai
achega
a94562e9f0
Modificáronse 6 ficheiros con 24 adicións e 23 borrados
  1. 3 3
      .drone.yml
  2. 14 18
      Makefile
  3. 1 1
      flow-ui
  4. 3 0
      go/TODO.md
  5. 2 0
      go/src/demos/cmd/demo1/main.go
  6. 1 1
      go/src/github.com/hexasoftware/flow

+ 3 - 3
.drone.yml

@@ -13,7 +13,7 @@ pipeline:
     image: drillster/drone-volume-cache
     restore: true
     mount:
-      - ./browser/vue-flow/node_modules
+      - ./flow-ui/node_modules
       - ./go/deps
     volumes:
       - /tmp/cache:/cache
@@ -41,7 +41,7 @@ pipeline:
     image: drillster/drone-volume-cache
     rebuild: true
     mount:
-      - ./browser/vue-flow/node_modules
+      - ./flow-ui/node_modules
       - ./go/deps
     volumes:
       - /tmp/cache:/cache
@@ -54,7 +54,7 @@ pipeline:
     commands:
       - echo $HOME
       - mkdir -p DIST
-      - cp -r browser/vue-flow/dist DIST/web
+      - cp -r flow-ui/dist DIST/web
       - docker build --rm -t hexasoftware.com:5000/flow-proto -f ./docker/Dockerfile .
       - docker push hexasoftware.com:5000/flow-proto
     volumes:

+ 14 - 18
Makefile

@@ -1,5 +1,5 @@
 
-all: DIST/demo1 DIST/web
+all: DIST/demo1 
 
 clean:
 	rm -rf DIST
@@ -11,28 +11,13 @@ DIST/demo1: DIST
 	cd go;make
 	cp go/DIST/* DIST/
 
+backend: DIST/demo1
 
 flow-ui/node_modules:
 	cd flow-ui; yarn
-
-DIST/web: DIST flow-ui/node_modules
-	mkdir -p DIST/web
+frontend: flow-ui/dist
 	cd flow-ui;yarn build
-	cp -r flow-ui/dist/* DIST/web
-
-DIST/.dockerized: DIST/demo1 DIST/web
-	docker build --rm -t hexasoftware.com:5000/flow-proto -f ./docker/Dockerfile .
-	touch DIST/.dockerized
-
-docker: DIST/.dockerized
-
-
-push: DIST/.dockerized
-	docker push hexasoftware.com:5000/flow-proto
-
-frontend: DIST/web
 
-backend: DIST/demo1
 
 dev: clean backend
 	tmux split "DEBUG=1 DIST/demo1;$$SHELL"
@@ -45,10 +30,21 @@ builder:
 
 test: 
 	make -C go test
+
+# need flow-ui
 generate:
 	make -C go generate
 
 
 
+update-ui: frontend 
+	# Needs folder2go tool
+	go get github.com/gohxs/folder2go
+	folder2go -nobackup flow-ui/dist flowuiassets go/src/github.com/hexasoftware/flow/flowserver/flowuiassets
+
+
+
+
+
 .PHONY: all clean frontend backend builder generate
 

+ 1 - 1
flow-ui

@@ -1 +1 @@
-Subproject commit c8a59f2fce421e8862bd0eb184675f6ed56d8000
+Subproject commit f44b844ab642dcede332ee1fda4341456dfb1c32

+ 3 - 0
go/TODO.md

@@ -0,0 +1,3 @@
+# Backend
+
+Move the UI out of the binary

+ 2 - 0
go/src/demos/cmd/demo1/main.go

@@ -58,6 +58,8 @@ func main() {
 		http.StripPrefix("/devops", flowserver.New(devops.New(), "devops")),
 	))
 
+	// Serve UI here
+
 	// Context registry
 	http.ListenAndServe(addr, mux)
 }

+ 1 - 1
go/src/github.com/hexasoftware/flow

@@ -1 +1 @@
-Subproject commit e6f22577b4e70841c3d6f1b61597afdd293408cf
+Subproject commit 6f0ecd997349eb0dd2341f0de272253051dad1dc