Sfoglia il codice sorgente

fix: add workers to mobile and electron release

Tienson Qin 3 mesi fa
parent
commit
18914d2fa2

+ 1 - 1
.github/workflows/clj-e2e.yml

@@ -78,7 +78,7 @@ jobs:
       # NOTE: require the app to be build with DEV-RELEASE flag
       - name: Prepare E2E test build
         run: |
-          yarn gulp:build && clojure -M:cljs release app --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug
+          yarn gulp:build && clojure -M:cljs release app --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-build
 
       - name: Run e2e tests
         run: cd clj-e2e && timeout 30m bb dev

+ 1 - 1
.github/workflows/clj-rtc-e2e.yml

@@ -79,7 +79,7 @@ jobs:
       # NOTE: require the app to be build with DEV-RELEASE flag
       - name: Prepare E2E test build
         run: |
-          yarn gulp:build && clojure -M:cljs release app --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug
+          yarn gulp:build && clojure -M:cljs release app --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-build
           rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/
           ls -lR ./public
 

+ 1 - 1
.github/workflows/deploy-db-test-pages.yml

@@ -42,7 +42,7 @@ jobs:
 
       - name: Build Released-Web
         run: |
-          yarn gulp:build && clojure -M:cljs release app  --config-merge '{:compiler-options {:source-map true :source-map-include-sources-content true :source-map-detail-level :symbols}}'
+          yarn gulp:build && clojure -M:cljs release app  --config-merge '{:compiler-options {:source-map true :source-map-include-sources-content true :source-map-detail-level :symbols}}' && yarn webpack-build
           rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/
           ls -lR ./public && mkdir r2 && mv ./public/js/main.js.map ./r2/db-test.main.js.map
           sed -i 's/=main.js.map/=https:\/\/assets.logseq.io\/db-test.main.js.map/g' ./public/js/main.js

+ 2 - 2
package.json

@@ -78,8 +78,8 @@
         "gulp:mobile-watch": "gulp watchMobile",
         "css:mobile-build": "postcss tailwind.mobile.css -o static/mobile/style.css --verbose --env production",
         "css:mobile-watch": "cross-env TAILWIND_MODE=watch postcss tailwind.mobile.css -o static/mobile/style.css --verbose --watch",
-        "cljs:mobile-watch": "clojure -M:cljs watch mobile",
-        "cljs:release-mobile": "clojure -M:cljs release mobile",
+        "cljs:mobile-watch": "clojure -M:cljs watch mobile workers",
+        "cljs:release-mobile": "clojure -M:cljs release mobile workers",
         "cljs:dev-watch": "clojure -M:cljs watch app workers electron mobile",
         "cljs:app-watch": "clojure -M:cljs watch app workers",
         "cljs:electron-watch": "clojure -M:cljs watch app workers electron --config-merge \"{:asset-path \\\"./js\\\"}\"",

+ 10 - 10
scripts/src/logseq/tasks/dev.clj

@@ -1,17 +1,17 @@
 (ns logseq.tasks.dev
   "Tasks for general development. For desktop or mobile development see their
   namespaces"
-  (:require [babashka.process :refer [shell]]
+  (:require [babashka.cli :as cli]
             [babashka.fs :as fs]
-            [babashka.cli :as cli]
-            [logseq.tasks.util :as task-util]
-            [logseq.tasks.dev.lint :as dev-lint]
+            [babashka.process :refer [shell]]
+            [clojure.core.async :as async]
+            [clojure.data :as data]
+            [clojure.edn :as edn]
             [clojure.java.io :as io]
             [clojure.pprint :as pp]
-            [clojure.edn :as edn]
-            [clojure.data :as data]
-            [clojure.core.async :as async]
-            [clojure.string :as string]))
+            [clojure.string :as string]
+            [logseq.tasks.dev.lint :as dev-lint]
+            [logseq.tasks.util :as task-util]))
 
 (defn test
   "Run tests. Pass args through to cmd 'yarn cljs:run-test'"
@@ -75,7 +75,7 @@
                                                     (fs/glob "." "{src/main,deps/graph-parser/src}/**")))))]
     (do
       (println "Building publishing js asset...")
-      (shell "clojure -M:cljs release publishing"))
+      (shell "clojure -M:cljs release publishing workers"))
     (println "Publishing js asset is up to date")))
 
 (defn publishing-backend
@@ -110,4 +110,4 @@
       (let [db-graph (fs/path parent-graph-dir (fs/file-name file-graph))]
         (println "Importing" (str db-graph) "...")
         (apply shell "bb" "dev:db-import" file-graph db-graph import-options)
-        (shell "bb" "dev:validate-db" db-graph "-gHc")))))
+        (shell "bb" "dev:validate-db" db-graph "-gHc")))))