diff options
author | zxp19821005 | 2024-12-31 17:00:14 +0800 |
---|---|---|
committer | zxp19821005 | 2024-12-31 17:00:14 +0800 |
commit | 3d508e3144ecaea2da4d796d68446c56e74c32cf (patch) | |
tree | e127ea22a35c814787b049b22443b5be7e4de092 | |
parent | 6399e14c1e2d439ca7154cfc2d6854885eaa0f01 (diff) | |
download | aur-3d508e3144ecaea2da4d796d68446c56e74c32cf.tar.gz |
update to fix errors
-rw-r--r-- | PKGBUILD | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -40,7 +40,7 @@ _ensure_local_nvm() { nvm install "${_nodeversion}" nvm use "${_nodeversion}" } -build() { +prepare() { sed -e " s/@electronversion@/${_electronversion}/g s/@appname@/${pkgname%-git}/g @@ -63,13 +63,17 @@ build() { if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then { echo 'registry=https://registry.npmmirror.com' - echo 'disturl=https://registry.npmmirror.com/-/binary/node/' echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/' echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/' } >> .npmrc + find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} + fi - sed -i "s/AppImage/dir/g;s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json + find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} + + sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json NODE_ENV=development npm install +} +build() { + cd "${srcdir}/${pkgname%-git}.git" NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist NODE_ENV=production npm run build NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}" |