Merge pull request #135 from MuhammedKalkan/fix-build-error

Fix npmrc file and build commands
This commit is contained in:
Muhammed Kalkan 2023-03-16 11:47:51 +03:00 committed by GitHub
commit d7dd484f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View File

@ -3,9 +3,9 @@ name: Build Lens
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: [ main ] branches: [main]
paths-ignore: paths-ignore:
- '**/README.md' - "**/README.md"
pull_request: pull_request:
jobs: jobs:
@ -50,7 +50,7 @@ jobs:
if [ "${CSC_KEY_PASSWORD}" = "" ]; then if [ "${CSC_KEY_PASSWORD}" = "" ]; then
unset CSC_KEY_PASSWORD unset CSC_KEY_PASSWORD
fi fi
yarn yarn run all:install
yarn run build yarn run build
yarn run build:app yarn run build:app
for file in packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.dmg; do for file in packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.dmg; do
@ -68,7 +68,7 @@ jobs:
fi fi
done done
elif [ "$RUNNER_OS" == "Linux" ]; then elif [ "$RUNNER_OS" == "Linux" ]; then
yarn yarn run all:install
yarn run build yarn run build
yarn run build:app yarn run build:app
cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.x86_64.AppImage releasefiles/OpenLens-${{ env.LENS_VERSION }}.AppImage cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.x86_64.AppImage releasefiles/OpenLens-${{ env.LENS_VERSION }}.AppImage
@ -78,7 +78,7 @@ jobs:
cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.arm64.deb releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.deb cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.arm64.deb releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.deb
cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.aarch64.rpm releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.rpm cp packages/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.aarch64.rpm releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.rpm
else else
yarn yarn run all:install
yarn run build yarn run build
yarn run build:app yarn run build:app
cp packages/open-lens/dist/OpenLens*.exe releasefiles/OpenLens-${{ env.LENS_VERSION }}.exe cp packages/open-lens/dist/OpenLens*.exe releasefiles/OpenLens-${{ env.LENS_VERSION }}.exe

View File

@ -15,3 +15,10 @@ if (process.platform != "win32") {
} }
fs.writeFileSync('./lens/packages/open-lens/package.json', JSON.stringify(packagejson)); fs.writeFileSync('./lens/packages/open-lens/package.json', JSON.stringify(packagejson));
let npmrc = fs.readFileSync('./lens/.npmrc','utf-8');
npmrc = npmrc.replace("disturl \"","disturl = \"")
npmrc = npmrc.replace("target \"","target = \"")
npmrc = npmrc.replace("runtime \"","runtime = \"")
fs.writeFileSync('./lens/.npmrc',npmrc)