1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Allow to develop & build on Windows powershell (#7081)

* allow to develop & build on windows powershell

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remove hardcoded bash shell from test workflow

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* use rimraf

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2023-02-01 15:58:18 +02:00 committed by GitHub
parent f445bd4eb9
commit df6f4b5fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 19 deletions

View File

@ -55,7 +55,6 @@ jobs:
- run: yarn run test:unit - run: yarn run test:unit
name: Run tests name: Run tests
shell: bash
if: ${{ matrix.type == 'unit' }} if: ${{ matrix.type == 'unit' }}
- name: Install integration test dependencies - name: Install integration test dependencies
@ -76,5 +75,4 @@ jobs:
- run: yarn run test:integration - run: yarn run test:integration
name: Run Windows integration tests name: Run Windows integration tests
shell: bash
if: ${{ runner.os == 'Windows' && matrix.type == 'smoke' }} if: ${{ runner.os == 'Windows' && matrix.type == 'smoke' }}

View File

@ -24,6 +24,8 @@
}, },
"devDependencies": { "devDependencies": {
"adr": "^1.4.3", "adr": "^1.4.3",
"lerna": "^6.4.1" "cross-env": "^7.0.3",
"lerna": "^6.4.1",
"rimraf": "^4.1.2"
} }
} }

View File

@ -50,10 +50,10 @@
"license": "MIT", "license": "MIT",
"author": "OpenLens Authors <info@k8slens.dev>", "author": "OpenLens Authors <info@k8slens.dev>",
"scripts": { "scripts": {
"build": "env NODE_ENV=production yarn run webpack --config webpack/library-bundle.ts", "build": "cross-env NODE_ENV=production yarn run webpack --config webpack/library-bundle.ts",
"clean": "rm -rf dist static/build", "clean": "rimraf dist static/build",
"prepare:dev": "env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --progress", "prepare:dev": "cross-env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --progress",
"dev": "env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --watch", "dev": "cross-env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --watch",
"test:unit": "jest --testPathIgnorePatterns integration", "test:unit": "jest --testPathIgnorePatterns integration",
"test:watch": "func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func", "test:watch": "func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func",
"lint": "PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .", "lint": "PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .",

View File

@ -5,7 +5,7 @@
"main": "dist/index.mjs", "main": "dist/index.mjs",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"clean": "rm -rf dist/", "clean": "rimraf dist/",
"build": "swc ./src/index.ts -o ./dist/index.mjs", "build": "swc ./src/index.ts -o ./dist/index.mjs",
"prepare:dev": "npm run build" "prepare:dev": "npm run build"
}, },

View File

@ -22,7 +22,7 @@
"scripts": { "scripts": {
"build": "yarn run webpack --config webpack/extensions.ts", "build": "yarn run webpack --config webpack/extensions.ts",
"build:docs": "yarn run typedoc", "build:docs": "yarn run typedoc",
"clean": "rm -rf dist/", "clean": "rimraf dist/",
"prepare:dev": "yarn run build" "prepare:dev": "yarn run build"
}, },
"dependencies": { "dependencies": {

View File

@ -14,7 +14,7 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"clean": "rm -rf dist/", "clean": "rimraf dist/",
"build": "webpack --config webpack.ts", "build": "webpack --config webpack.ts",
"lint": "exit 0", "lint": "exit 0",
"prepare": "npm run build", "prepare": "npm run build",

View File

@ -18,21 +18,21 @@
"license": "MIT", "license": "MIT",
"author": "OpenLens Authors <info@k8slens.dev>", "author": "OpenLens Authors <info@k8slens.dev>",
"scripts": { "scripts": {
"clean": "rm -rf binaries/ dist/ static/build", "clean": "rimraf binaries/ dist/ static/build",
"build": "npm run compile", "build": "npm run compile",
"postbuild": "npm run build:tray-icons && npm run download:binaries", "postbuild": "npm run build:tray-icons && npm run download:binaries",
"build:app": "electron-builder --publish onTag", "build:app": "electron-builder --publish onTag",
"prebuild:app": "run-script-os", "prebuild:app": "run-script-os",
"prebuild:app:default": "exit 0", "prebuild:app:default": "exit 0",
"prebuild:app:win32": "rm -rf node_modules/win-ca/pem", "prebuild:app:win32": "rimraf node_modules/win-ca/pem",
"build:dir": "npm run compile && electron-builder --dir", "build:dir": "npm run compile && electron-builder --dir",
"compile": "env NODE_ENV=production webpack --config webpack/webpack.ts --progress", "compile": "cross-env NODE_ENV=production webpack --config webpack/webpack.ts --progress",
"postcompile": "npm run build:tray-icons && npm run download:binaries", "postcompile": "npm run build:tray-icons && npm run download:binaries",
"predev": "rm -rf static/build/ && npm run build:tray-icons && npm run download:binaries", "predev": "rimraf static/build/ && npm run build:tray-icons && npm run download:binaries",
"dev": "concurrently -i -k \"yarn run dev-run -C\" yarn:dev:*", "dev": "concurrently -i -k \"yarn run dev-run -C\" yarn:dev:*",
"dev-run": "nodemon --watch ./static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"", "dev-run": "nodemon --watch ./static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"",
"dev:main": "env NODE_ENV=development webpack --config webpack/main.ts --progress --watch", "dev:main": "cross-env NODE_ENV=development webpack --config webpack/main.ts --progress --watch",
"dev:renderer": "env NODE_ENV=development ts-node ./webpack/dev-server.ts", "dev:renderer": "cross-env NODE_ENV=development ts-node ./webpack/dev-server.ts",
"test:integration": "jest -xyz --runInBand --detectOpenHandles --forceExit --modulePaths=[\"<rootDir>/integration/\"];", "test:integration": "jest -xyz --runInBand --detectOpenHandles --forceExit --modulePaths=[\"<rootDir>/integration/\"];",
"build:tray-icons": "ts-node build/generate-tray-icons.ts", "build:tray-icons": "ts-node build/generate-tray-icons.ts",
"download:binaries": "npm exec -- @k8slens/ensure-binaries --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client" "download:binaries": "npm exec -- @k8slens/ensure-binaries --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client"

View File

@ -6,7 +6,7 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {
"clean": "rm -rf dist/", "clean": "rimraf dist/",
"build": "swc ./src/index.ts -o ./dist/index.mjs", "build": "swc ./src/index.ts -o ./dist/index.mjs",
"create-release-pr": "node ./dist/index.mjs" "create-release-pr": "node ./dist/index.mjs"
}, },

View File

@ -6,7 +6,7 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {
"clean": "rm -rf dist/", "clean": "rimraf dist/",
"build": "swc ./src/index.ts -o ./dist/index.mjs" "build": "swc ./src/index.ts -o ./dist/index.mjs"
}, },
"dependencies": { "dependencies": {

View File

@ -1818,7 +1818,14 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0" path-type "^4.0.0"
yaml "^1.10.0" yaml "^1.10.0"
cross-spawn@^7.0.3: cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"
cross-spawn@^7.0.1, cross-spawn@^7.0.3:
version "7.0.3" version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@ -4341,6 +4348,11 @@ rimraf@^3.0.0, rimraf@^3.0.2:
dependencies: dependencies:
glob "^7.1.3" glob "^7.1.3"
rimraf@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.1.2.tgz#20dfbc98083bdfaa28b01183162885ef213dbf7c"
integrity sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==
run-async@^2.4.0: run-async@^2.4.0:
version "2.4.1" version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"