Compare commits
	
		
			16 Commits
		
	
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | a7d44fba75 | |
|  | 03b3f94661 | |
|  | ea015ca86f | |
|  | 69e11a872e | |
|  | 583a606ee3 | |
|  | 46e3bfe503 | |
|  | 0f102c4f64 | |
|  | 32fca4b84b | |
|  | 8cb4107664 | |
|  | c4b099462f | |
|  | ed93e90606 | |
|  | 391c2cd111 | |
|  | a2d9d20044 | |
|  | 7c226405b1 | |
|  | d87072ab17 | |
|  | d66845b79f | 
|  | @ -1,157 +0,0 @@ | |||
| name: Build Lens | ||||
| 
 | ||||
| on: | ||||
|   workflow_dispatch: | ||||
|   push: | ||||
|     branches: [main] | ||||
|     paths-ignore: | ||||
|       - "**/README.md" | ||||
|   pull_request: | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [ubuntu-20.04, macos-latest, windows-latest] | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     timeout-minutes: 360 | ||||
|     steps: | ||||
|       - name: Checkout OpenLens | ||||
|         uses: actions/checkout@v3 | ||||
|       - name: Export version to variable | ||||
|         run: | | ||||
|           export LENS_VERSION=$(cat version) | ||||
|           echo "LENS_VERSION=$LENS_VERSION" >> $GITHUB_ENV | ||||
|         shell: bash | ||||
|       - uses: actions/setup-node@v3 | ||||
|         with: | ||||
|           node-version: "16.x" | ||||
|       - name: Checkout Upstream Lens | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           repository: lensapp/lens | ||||
|           path: lens | ||||
|           ref: v${{ env.LENS_VERSION }} | ||||
|           fetch-depth: 1 | ||||
|       - name: Patch Upstream Lens | ||||
|         run: | | ||||
|           node update.js | ||||
|       - name: Build Lens | ||||
|         run: | | ||||
|           mkdir releasefiles | ||||
|           if [ "$RUNNER_OS" == "Windows" ]; then | ||||
|             choco install visualstudio2019buildtools visualstudio2019-workload-vctools | ||||
|           fi | ||||
|            | ||||
|           npm run all:install | ||||
|           # Avoid npm install from electron-builder | ||||
|           # ref: https://github.com/electron-userland/electron-builder/blob/80a3ae857b9305aff1774e1b2b932601af50231b/packages/app-builder-lib/src/util/yarn.ts#L11-L16 | ||||
|           mkdir open-lens/node_modules | ||||
|            | ||||
|           if [ "$RUNNER_OS" == "macOS" ]; then             | ||||
|             if [ "${CSC_LINK}" = "" ]; then | ||||
|               unset CSC_LINK | ||||
|             fi | ||||
|              | ||||
|             if [ "${CSC_KEY_PASSWORD}" = "" ]; then | ||||
|               unset CSC_KEY_PASSWORD | ||||
|             fi | ||||
|              | ||||
|             npx nx run open-lens:build:app --x64 --arm64 | ||||
|            | ||||
|             for file in open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.dmg; do | ||||
|               if [[ "$file" == *"arm64"* ]]; then | ||||
|                 cp "$file" releasefiles/OpenLens-${{ env.LENS_VERSION }}-arm64.dmg | ||||
|               else | ||||
|                 cp "$file" releasefiles/OpenLens-${{ env.LENS_VERSION }}.dmg | ||||
|               fi | ||||
|             done | ||||
|             for file in open-lens/dist/OpenLens-${{ env.LENS_VERSION }}-mac.zip; do | ||||
|               if [[ "$file" == *"arm64"* ]]; then | ||||
|                 cp "$file" releasefiles/OpenLens-${{ env.LENS_VERSION }}-arm64.zip | ||||
|               else | ||||
|                 cp "$file" releasefiles/OpenLens-${{ env.LENS_VERSION }}.zip | ||||
|               fi | ||||
|             done | ||||
|           elif [ "$RUNNER_OS" == "Linux" ]; then | ||||
|             npx nx run open-lens:build:app --x64 --arm64 | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.x86_64.AppImage releasefiles/OpenLens-${{ env.LENS_VERSION }}.AppImage | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.amd64.deb releasefiles/OpenLens-${{ env.LENS_VERSION }}.deb | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.x86_64.rpm releasefiles/OpenLens-${{ env.LENS_VERSION }}.rpm | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.arm64.AppImage releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.AppImage | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.arm64.deb releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.deb | ||||
|             cp open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.aarch64.rpm releasefiles/OpenLens-${{ env.LENS_VERSION }}.arm64.rpm | ||||
|           else | ||||
|             unset DOWNLOAD_ALL_ARCHITECTURES | ||||
|             npx nx run open-lens:build:app | ||||
|             cp open-lens/dist/OpenLens*.exe releasefiles/OpenLens-${{ env.LENS_VERSION }}.exe | ||||
|             cp open-lens/dist/OpenLens*.exe open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.exe | ||||
|           fi | ||||
|         shell: bash | ||||
|         working-directory: lens | ||||
|         env: | ||||
|           APPBUNDLEID: "io.kontena.lens-app" | ||||
|           APPLEID: ${{ secrets.APPLEID }} | ||||
|           APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | ||||
|           CSC_LINK: ${{ runner.os == 'macos' && secrets.CSC_LINK || secrets.CSC_LINK_WIN }} | ||||
|           CSC_KEY_PASSWORD: ${{ runner.os == 'macos' && secrets.CSC_KEY_PASSWORD || secrets.CSC_KEY_PASSWORD_WIN}} | ||||
|           CSC_LINK_WIN: ${{ secrets.CSC_LINK_WIN }} | ||||
|           CSC_KEY_PASSWORD_WIN: ${{ secrets.CSC_KEY_PASSWORD_WIN }} | ||||
|           WIN_CSC_LINK: ${{ secrets.CSC_LINK_WIN }} | ||||
|           WIN_CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD_WIN }} | ||||
|           CSC_FOR_PULL_REQUEST: true | ||||
|           DOWNLOAD_ALL_ARCHITECTURES: true | ||||
| 
 | ||||
|       - name: Calculate SHA256 checksum | ||||
|         run: | | ||||
|           if [ "$RUNNER_OS" == "Windows" ]; then | ||||
|             certutil -hashfile OpenLens-${{ env.LENS_VERSION }}.exe SHA256 | tee OpenLens-${{ env.LENS_VERSION }}.exe.sha256 | ||||
|           else | ||||
|             for filename in OpenLens-${{ env.LENS_VERSION }}*; do shasum -a 256 ${filename} | tee ${filename}.sha256 ; done | ||||
|           fi | ||||
|         shell: bash | ||||
|         working-directory: lens/open-lens/dist | ||||
| 
 | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: github.ref != 'refs/heads/main' | ||||
|         with: | ||||
|           name: OpenLens-${{ matrix.os }} | ||||
|           retention-days: 5 | ||||
|           path: | | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.dmg | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.AppImage | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.deb | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.rpm | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.zip | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.exe | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.sha256 | ||||
| 
 | ||||
|       - name: Generate Changelog | ||||
|         run: curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq -r 'select(.prerelease == false) | .body[0:]' > ${{ github.workspace }}-CHANGELOG.txt | ||||
|       - name: Release | ||||
|         uses: softprops/action-gh-release@v0.1.15 | ||||
|         if: github.ref == 'refs/heads/main' | ||||
|         with: | ||||
|           tag_name: v${{ env.LENS_VERSION }} | ||||
|           body_path: ${{ github.workspace }}-CHANGELOG.txt | ||||
|           files: | | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.dmg | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.AppImage | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.deb | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.rpm | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.zip | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}.exe | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.sha256 | ||||
|       - name: Latest | ||||
|         uses: softprops/action-gh-release@v0.1.15 | ||||
|         if: github.ref == 'refs/heads/main' | ||||
|         with: | ||||
|           tag_name: Latest | ||||
|           files: | | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.dmg | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.AppImage | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.deb | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.rpm | ||||
|             lens/open-lens/dist/OpenLens-${{ env.LENS_VERSION }}*.zip | ||||
|             lens/open-lens/dist/OpenLens.Setup.${{ env.LENS_VERSION }}.exe | ||||
|             lens/open-lens/dist/lates*.yml | ||||
|  | @ -1,2 +1,3 @@ | |||
| .DS_Store | ||||
| README.md | ||||
| /lens/ | ||||
|  |  | |||
|  | @ -1,13 +1,14 @@ | |||
| # OpenLens Build Repo | ||||
| > [!CAUTION] | ||||
| > Lens Closed its source code. So please do not expect any more updates. | ||||
| 
 | ||||
| [](https://github.com/MuhammedKalkan/OpenLens/actions/workflows/main.yml) | ||||
| # OpenLens Build Repo | ||||
| 
 | ||||
| ##  Build Repo Only | ||||
| This repo **ONLY PROVIDES SIGNED BINARIES AND DOES NOT ALTER SOURCE CODE** for the OpenLens repo. For software issues regarding OpenLens or the Lens IDE, go to the [Lens repo](https://github.com/lensapp/lens/issues) and open an issue there. | ||||
| 
 | ||||
| ## Extensions | ||||
| 
 | ||||
| Starting with 6.3.0 some extensions are removed from Lens. To install these most used extensions simply type **@alebcay/openlens-node-pod-menu** into the Extensions UI in OpenLens Settings page and it should install automatically. | ||||
| Starting with 6.3.0 some extensions are removed from Lens. To install these most used extensions simply type **@alebcay/openlens-node-pod-menu** into the Extensions page in the OpenLens menu and it should install automatically. If you see the extension rapidly toggling between `enabled` and `disabled`, restart OpenLens and enable it in the Extension page. | ||||
| For sources please refer [here](https://www.npmjs.com/package/@alebcay/openlens-node-pod-menu) | ||||
| 
 | ||||
| ## Overview | ||||
|  |  | |||
|  | @ -0,0 +1,17 @@ | |||
| const archMap = { | ||||
|     "amd64": "x86_64", | ||||
|     "arm64": "aarch64", | ||||
| } | ||||
| 
 | ||||
| module.exports = async (buildContext) => { | ||||
|     if (buildContext.platform.name !== "linux") return true | ||||
| 
 | ||||
|     if (buildContext.arch in archMap) { | ||||
|         process.env.CC = `${archMap[buildContext.arch]}-linux-gnu-gcc` | ||||
|         process.env.CXX = `${archMap[buildContext.arch]}-linux-gnu-g++` | ||||
|     } else { | ||||
|         process.env.CC = "gcc" | ||||
|         process.env.CXX = "g++" | ||||
|     } | ||||
|     return true | ||||
| } | ||||
|  | @ -10,7 +10,7 @@ jobs: | |||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3.0.2 | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           token: ${{ secrets.PAT }} | ||||
|       - name: Get the latest version of Lens | ||||
|  | @ -0,0 +1,120 @@ | |||
| name: Build Lens | ||||
| 
 | ||||
| on: | ||||
|   workflow_dispatch: | ||||
|   push: | ||||
|     branches: [main] | ||||
|     paths-ignore: | ||||
|       - "**/README.md" | ||||
|   pull_request: | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [ ubuntu-20.04, macos-latest, windows-latest ] | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     timeout-minutes: 360 | ||||
|     env: | ||||
|       BUILD_ID: ${{ github.run_number }} | ||||
|     steps: | ||||
|       - name: Checkout OpenLens | ||||
|         uses: actions/checkout@v3 | ||||
| 
 | ||||
|       - name: Export version to variable | ||||
|         run: echo "LENS_VERSION=$(cat version)" >> $GITHUB_ENV | ||||
|         shell: bash | ||||
| 
 | ||||
|       - uses: actions/setup-node@v3 | ||||
|         with: | ||||
|           node-version: "16.x" | ||||
| 
 | ||||
|       - name: Checkout Upstream Lens | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           repository: lensapp/lens | ||||
|           path: lens | ||||
|           ref: v${{ env.LENS_VERSION }} | ||||
|           fetch-depth: 1 | ||||
| 
 | ||||
|       - name: Patch Upstream Lens | ||||
|         run: node update.js | ||||
| 
 | ||||
|       - name: Build Lens | ||||
|         run: | | ||||
|           npm run all:install | ||||
|           # Avoid npm install from electron-builder | ||||
|           # ref: https://github.com/electron-userland/electron-builder/blob/80a3ae857b9305aff1774e1b2b932601af50231b/packages/app-builder-lib/src/util/yarn.ts#L11-L16 | ||||
|           mkdir -p open-lens/node_modules | ||||
|            | ||||
|           if [ "${CSC_LINK}" = "" ] || [ "${CSC_KEY_PASSWORD}" = "" ]; then | ||||
|             unset CSC_LINK | ||||
|             unset CSC_KEY_PASSWORD | ||||
|           fi | ||||
|            | ||||
|           if [ "$RUNNER_OS" == "Windows" ]; then | ||||
|             npx nx run open-lens:build:app --win nsis msi portable | ||||
|           elif [ "$RUNNER_OS" == "Linux" ]; then | ||||
|             sudo apt update | ||||
|             sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y | ||||
|            | ||||
|             npx nx run open-lens:build:app --x64 --arm64 | ||||
|             find . -name '*pty.node' -print0 | xargs -0 file | ||||
|           else | ||||
|             npx nx run open-lens:build:app --x64 --arm64 | ||||
|             find . -name '*pty.node' -print0 | xargs -0 file | ||||
|           fi | ||||
|            | ||||
|           rm -f open-lens/dist/*blockmap{,*} | ||||
|         shell: bash | ||||
|         working-directory: lens | ||||
|         env: | ||||
|           APPBUNDLEID: "io.kontena.lens-app" | ||||
|           APPLEID: ${{ secrets.APPLEID }} | ||||
|           APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | ||||
|           CSC_LINK: ${{ runner.os == 'macos' && secrets.CSC_LINK || secrets.CSC_LINK_WIN }} | ||||
|           CSC_KEY_PASSWORD: ${{ runner.os == 'macos' && secrets.CSC_KEY_PASSWORD || secrets.CSC_KEY_PASSWORD_WIN }} | ||||
|           CSC_LINK_WIN: ${{ secrets.CSC_LINK_WIN }} | ||||
|           CSC_KEY_PASSWORD_WIN: ${{ secrets.CSC_KEY_PASSWORD_WIN }} | ||||
|           WIN_CSC_LINK: ${{ secrets.CSC_LINK_WIN }} | ||||
|           WIN_CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD_WIN }} | ||||
|           CSC_FOR_PULL_REQUEST: true | ||||
|           DOWNLOAD_ALL_ARCHITECTURES: ${{ runner.os != 'Windows' }} | ||||
| 
 | ||||
|       - name: Calculate SHA256 checksum | ||||
|         run: |- | ||||
|           if command -v shasum 2>/dev/null 1>&2; then | ||||
|             for filename in OpenLens*; do shasum -a 256 "${filename}" | tee "${filename}.sha256" ; done | ||||
|           else | ||||
|             for filename in OpenLens*; do certutil -hashfile "${filename}" SHA256 | tee "${filename}.sha256" ; done | ||||
|           fi | ||||
| 
 | ||||
|         shell: bash | ||||
|         working-directory: lens/open-lens/dist | ||||
| 
 | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: github.ref != 'refs/heads/main' | ||||
|         with: | ||||
|           name: OpenLens-${{ matrix.os }} | ||||
|           retention-days: 5 | ||||
|           path: lens/open-lens/dist/OpenLens*${{ env.LENS_VERSION }}-${{ env.BUILD_ID }}*.* | ||||
| 
 | ||||
|       - name: Generate Changelog | ||||
|         run: curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq -r 'select(.prerelease == false) | .body[0:]' > ${{ github.workspace }}-CHANGELOG.txt | ||||
| 
 | ||||
|       - name: Release | ||||
|         uses: softprops/action-gh-release@v0.1.15 | ||||
|         if: github.ref == 'refs/heads/main' | ||||
|         with: | ||||
|           tag_name: v${{ env.LENS_VERSION }}-${{ env.BUILD_ID }} | ||||
|           body_path: ${{ github.workspace }}-CHANGELOG.txt | ||||
|           files: lens/open-lens/dist/OpenLens*${{ env.LENS_VERSION }}-${{ env.BUILD_ID }}*.* | ||||
| 
 | ||||
|       - name: Latest | ||||
|         uses: softprops/action-gh-release@v0.1.15 | ||||
|         if: github.ref == 'refs/heads/main' | ||||
|         with: | ||||
|           tag_name: Latest | ||||
|           files: | | ||||
|             lens/open-lens/dist/OpenLens*${{ env.LENS_VERSION }}-${{ env.BUILD_ID }}*.* | ||||
|             #lens/open-lens/dist/lates*.yml | ||||
							
								
								
									
										23
									
								
								update.js
								
								
								
								
							
							
						
						
									
										23
									
								
								update.js
								
								
								
								
							|  | @ -1,13 +1,26 @@ | |||
| const fs = require('fs'); | ||||
| 
 | ||||
| var packagejson = require('./lens/open-lens/package.json'); | ||||
| const packageJsonOpenLens = require('./lens/open-lens/package.json'); | ||||
| 
 | ||||
| packagejson.build.publish = [{ | ||||
| packageJsonOpenLens.build.publish = [{ | ||||
|     url: "https://github.com/MuhammedKalkan/OpenLens/releases/download/Latest", | ||||
|     provider: "generic" | ||||
| }]; | ||||
| 
 | ||||
| packagejson.build.win.artifactName = "OpenLens.Setup.${version}.${ext}"; | ||||
| packagejson.build.npmRebuild = true; | ||||
| packageJsonOpenLens.version = `${packageJsonOpenLens.version}-${process.env.BUILD_ID}`; | ||||
| packageJsonOpenLens.build.npmRebuild = true; | ||||
| packageJsonOpenLens.build.detectUpdateChannel = false; | ||||
| packageJsonOpenLens.build.beforeBuild = '../../build-hooks/beforeBuild'; | ||||
| 
 | ||||
| fs.writeFileSync('./lens/open-lens/package.json', JSON.stringify(packagejson)); | ||||
| delete packageJsonOpenLens.scripts.postinstall; | ||||
| 
 | ||||
| packageJsonOpenLens.copyright = [ | ||||
|     packageJsonOpenLens.copyright, | ||||
|     '', | ||||
|     'Binary application builds @ MuhammedKalkan/OpenLens', | ||||
|     'by Muhammed Kalkan, Jan-Otto Kröpke, Ebby Peter, Xaver Lohmüller' | ||||
| ].join("\r\n") | ||||
| 
 | ||||
| console.log(`Set build version: ${packageJsonOpenLens.version}`) | ||||
| 
 | ||||
| fs.writeFileSync('./lens/open-lens/package.json', JSON.stringify(packageJsonOpenLens, null, 2)); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue