Fix electron build
This commit is contained in:
@@ -26,12 +26,12 @@ jobs:
|
||||
- name: Install modules
|
||||
run: cd ../ && npm install
|
||||
|
||||
- name: Build package
|
||||
run: cd ../ && npm run build
|
||||
|
||||
- name: Build android nodejs packages
|
||||
run: cd ../static/nodejs-android && npm install
|
||||
|
||||
- name: Build package
|
||||
run: cd ../ && npm run build
|
||||
|
||||
- name: Sync package
|
||||
run: cd ../ && npx cap sync
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 42
|
||||
versionName "1.5.1"
|
||||
versionCode 43
|
||||
versionName "1.5.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
@@ -21,7 +21,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.0",
|
||||
"capacitor-nodejs": "https://github.com/EdenwareApps/Capacitor-NodeJS/releases/download/v1.0.0-beta.7/capacitor6-nodejs.tgz",
|
||||
"chokidar": "~3.6.0",
|
||||
"electron-is-dev": "~2.0.0",
|
||||
"electron-serve": "~1.1.0",
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
"""Script for removing unwanted Capacitor plugins
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
WORKING_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
ELECTRON_PLUGIN_FILE = os.path.join(WORKING_DIR, "src", "rt", "electron-plugins.js")
|
||||
PACKAGE_JSON = os.path.join(WORKING_DIR, "package.json")
|
||||
|
||||
|
||||
ELECTRON_PLUGIN_REPLACEMENT = """/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
module.exports = {
|
||||
}"""
|
||||
|
||||
|
||||
def run():
|
||||
with open(ELECTRON_PLUGIN_FILE, "w") as f_:
|
||||
f_.write(ELECTRON_PLUGIN_REPLACEMENT)
|
||||
|
||||
with open(PACKAGE_JSON, "r") as f_:
|
||||
package: dict = json.loads(f_.read())
|
||||
if "dependencies" not in package:
|
||||
return
|
||||
|
||||
package["dependencies"].pop("capacitor-nodejs")
|
||||
|
||||
f_.close()
|
||||
|
||||
with open(PACKAGE_JSON, "w") as f_:
|
||||
f_.write(json.dumps(package, indent="\t"))
|
||||
|
||||
subprocess.call(["npm", "install"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
@@ -1,6 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const CapacitorNodejs = require('../../../node_modules/capacitor-nodejs/electron/dist/plugin.js');
|
||||
|
||||
module.exports = {
|
||||
CapacitorNodejs,
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
|
||||
LATEST_VERSION = "1.5.1"
|
||||
LATEST_VERSION = "1.5.2"
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")
|
||||
|
||||
Reference in New Issue
Block a user