Skip to content

Commit

Permalink
fix: Mac: Unable to use External Commands (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic authored Sep 8, 2024
1 parent 647678e commit 8dbf69c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ jobs:
- rid: win-x64
fileName: KubeUI.Desktop.exe
runs-on: windows-latest
icon: --icon ../KubeUI/Assets/icon.ico
packParam: --icon ../KubeUI/Assets/icon.ico
- rid: win-arm64
fileName: KubeUI.Desktop.exe
runs-on: windows-latest
icon: --icon ../KubeUI/Assets/icon.ico
packParam: --icon ../KubeUI/Assets/icon.ico
- rid: linux-x64
fileName: KubeUI.Desktop
runs-on: ubuntu-latest
icon: ''
packParam: ''
- rid: linux-arm64
fileName: KubeUI.Desktop
runs-on: ubuntu-latest
icon: ''
packParam: ''
- rid: osx-x64
fileName: KubeUI.Desktop
runs-on: macos-latest
icon: --icon ../KubeUI/Assets/icon.icns
packParam: --icon ../KubeUI/Assets/icon.icns --plist info.plist
- rid: osx-arm64
fileName: KubeUI.Desktop
runs-on: macos-latest
icon: --icon ../KubeUI/Assets/icon.icns
packParam: --icon ../KubeUI/Assets/icon.icns --plist info.plist
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -107,11 +107,19 @@ jobs:
working-directory: src/KubeUI.Desktop
run: dotnet publish -c Release -r ${{ matrix.rid }} -o bin/publish -p:Version=${{ needs.semantic-release.outputs.new_release_version }}

- name: Replace single file
if: matrix.runs-on == 'macos-latest'
uses: richardrigutins/replace-in-files@v2
with:
files: 'src/KubeUI.Desktop/info.plist'
search-text: '{{version}}'
replacement-text: ${{ needs.semantic-release.outputs.new_release_version }}

- name: Create Release
working-directory: src/KubeUI.Desktop
run: |
vpk download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} -c ${{ matrix.rid }} --pre
vpk pack --packTitle KubeUI -u KubeUI -v ${{ needs.semantic-release.outputs.new_release_version }} -p bin/publish -c ${{ matrix.rid }} -e ${{ matrix.fileName }} -o packed ${{ matrix.icon }}
vpk pack --packTitle KubeUI -u KubeUI -v ${{ needs.semantic-release.outputs.new_release_version }} -p bin/publish -c ${{ matrix.rid }} -e ${{ matrix.fileName }} -o packed ${{ matrix.packParam }}
- name: Remove unnecessary assets
working-directory: src/KubeUI.Desktop
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Go to [Releases](https://github.com/IvanJosipovic/KubeUI/releases) and download
Supported Platforms (AMD64 and ARM64):

- Linux
- Mac
- Mac ([*Note Issue](https://github.com/IvanJosipovic/KubeUI/issues/688))
- Windows

## Example
Expand Down
33 changes: 33 additions & 0 deletions src/KubeUI.Desktop/info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>KubeUI</string>
<key>CFBundleIdentifier</key>
<string>com.KubeUI.Desktop</string>
<key>CFBundleVersion</key>
<string>{{version}}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>KubeUI.Desktop</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true />
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSEnvironment</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:</string>
</dict>
</dict>
</plist>

0 comments on commit 8dbf69c

Please sign in to comment.