Browse Source

fix: workflows

Tienson Qin 2 months ago
parent
commit
238b071b62

+ 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 workers --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-build
+          yarn gulp:build && clojure -M:cljs release app workers --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-app-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 workers --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-build
+          yarn gulp:build && clojure -M:cljs release app workers --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && yarn webpack-app-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 workers  --config-merge '{:compiler-options {:source-map true :source-map-include-sources-content true :source-map-detail-level :symbols}}' && yarn webpack-build
+          yarn gulp:build && clojure -M:cljs release app workers  --config-merge '{:compiler-options {:source-map true :source-map-include-sources-content true :source-map-detail-level :symbols}}' && yarn webpack-app-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

+ 12 - 8
package.json

@@ -50,18 +50,22 @@
     },
     "scripts": {
         "watch": "run-p gulp:watch cljs:watch",
-        "electron-watch": "run-p gulp:watch cljs:electron-watch webpack",
-        "app-watch": "run-p gulp:watch cljs:app-watch webpack",
+        "electron-watch": "run-p gulp:watch cljs:electron-watch webpack --config-name app",
+        "app-watch": "run-p gulp:watch cljs:app-watch webpack-app-watch",
+        "mobile-watch": "run-p gulp:mobile-watch cljs:mobile-watch webpack-mobile-watch",
         "dev": "run-p gulp:watch gulp:mobile-watch cljs:dev-watch webpack",
-        "release": "run-s gulp:build cljs:release webpack-build",
-        "release-app": "run-s gulp:build cljs:release-app webpack-build",
-        "release-mobile": "run-s gulp:buildMobile cljs:release-mobile webpack-build",
-        "dev-release-app": "run-s gulp:build cljs:dev-release-app webpack-build",
+        "release": "run-s gulp:build cljs:release webpack-app-build",
+        "release-app": "run-s gulp:build cljs:release-app webpack-app-build",
+        "release-mobile": "run-s gulp:buildMobile cljs:release-mobile webpack-mobile-build",
+        "dev-release-app": "run-s gulp:build cljs:dev-release-app webpack-app-build",
         "dev-electron-app": "gulp electron",
-        "release-electron": "run-s gulp:build && gulp electronMaker webpack-build",
+        "release-electron": "run-s gulp:build && gulp electronMaker webpack-app-build",
         "debug-electron": "cd static/ && yarn electron:debug",
         "webpack": "webpack --watch",
-        "webpack-build": "npx webpack build",
+        "webpack-app-watch": "npx webpack --watch --config-name app",
+        "webpack-mobile-watch": "npx webpack --watch --config-name mobile",
+        "webpack-app-build": "npx webpack build --config-name app",
+        "webpack-mobile-build": "npx webpack build --config-name mobile",
         "sync-android-release": "yarn clean && yarn release-mobile && rm -rf ./static/mobile/**/*.map && npx cap sync android",
         "sync-ios-release": "yarn clean && yarn release-mobile && rm -rf ./static/mobile/**/*.map && npx cap sync ios",
         "clean": "gulp clean",

+ 1 - 1
webpack.config.js

@@ -42,7 +42,7 @@ var AppConfig = Object.assign({}, config, {
 });
 
 var MobileConfig = Object.assign({}, config, {
-  name: "app",
+  name: "mobile",
   entry: {
     main : "./target/mobile.js",
     workers : "./target/workers.js",